From 374835ad8ac0068dead5d4afdea7b3f5adfe21ff Mon Sep 17 00:00:00 2001 From: Azure PowerShell <65331932+azure-powershell-bot@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:02:37 +0800 Subject: [PATCH] Move Oracle to main (#25571) --- src/Oracle/Oracle.Autorest/Az.Oracle.csproj | 10 + .../Oracle.Autorest/Az.Oracle.format.ps1xml | 6367 ++++ src/Oracle/Oracle.Autorest/Az.Oracle.psd1 | 23 + src/Oracle/Oracle.Autorest/Az.Oracle.psm1 | 119 + src/Oracle/Oracle.Autorest/README.md | 88 + ...usDatabases-autonomousDatabaseBackups.json | 95 + .../Oracle.Database/autonomousDatabases.json | 85 + ...cloudExadataInfrastructures-dbServers.json | 52 + .../cloudExadataInfrastructures.json | 85 + .../cloudVmClusters-dbNodes.json | 52 + .../UX/Oracle.Database/cloudVmClusters.json | 85 + ...tions-autonomousDatabaseCharacterSets.json | 47 + ...tonomousDatabaseNationalCharacterSets.json | 47 + .../locations-autonomousDbVersions.json | 47 + .../locations-dbSystemShapes.json | 47 + .../locations-dnsPrivateViews.json | 47 + .../locations-dnsPrivateZones.json | 47 + .../Oracle.Database/locations-giVersions.json | 47 + src/Oracle/Oracle.Autorest/build-module.ps1 | 190 + .../Oracle.Autorest/check-dependencies.ps1 | 65 + .../Oracle.Autorest/create-model-cmdlets.ps1 | 262 + .../custom/Az.Oracle.custom.psm1 | 17 + src/Oracle/Oracle.Autorest/custom/README.md | 41 + .../New-AzOracleCustomerContactObject.ps1 | 47 + .../New-AzOracleNsgCidrObject.ps1 | 59 + .../examples/Add-AzOracleCloudVMClusterVM.md | 13 + .../Get-AzOracleAutonomousDatabase.md | 63 + .../Get-AzOracleAutonomousDatabaseBackup.md | 17 + ...-AzOracleAutonomousDatabaseCharacterSet.md | 13 + ...eAutonomousDatabaseNationalCharacterSet.md | 12 + .../Get-AzOracleAutonomousDatabaseVersion.md | 15 + .../Get-AzOracleCloudExadataInfrastructure.md | 50 + .../examples/Get-AzOracleCloudVMCluster.md | 48 + .../examples/Get-AzOracleDbNode.md | 14 + .../examples/Get-AzOracleDbServer.md | 15 + .../examples/Get-AzOracleDbSystemShape.md | 40 + .../examples/Get-AzOracleDnsPrivateView.md | 15 + .../examples/Get-AzOracleDnsPrivateZone.md | 15 + .../examples/Get-AzOracleGiVersion.md | 14 + .../examples/Invoke-AzOracleActionDbNode.md | 103 + ...ke-AzOracleSwitchoverAutonomousDatabase.md | 7 + .../New-AzOracleAutonomousDatabase.md | 75 + .../New-AzOracleAutonomousDatabaseBackup.md | 7 + .../New-AzOracleCloudExadataInfrastructure.md | 34 + .../examples/New-AzOracleCloudVMCluster.md | 69 + .../New-AzOracleCustomerContactObject.md | 7 + .../examples/New-AzOracleNsgCidrObject.md | 7 + .../Remove-AzOracleAutonomousDatabase.md | 13 + ...Remove-AzOracleAutonomousDatabaseBackup.md | 7 + ...move-AzOracleCloudExadataInfrastructure.md | 13 + .../examples/Remove-AzOracleCloudVMCluster.md | 13 + .../Remove-AzOracleCloudVMClusterVM.md | 13 + .../Restore-AzOracleAutonomousDatabase.md | 8 + .../Update-AzOracleAutonomousDatabase.md | 64 + ...date-AzOracleCloudExadataInfrastructure.md | 70 + .../examples/Update-AzOracleCloudVMCluster.md | 82 + src/Oracle/Oracle.Autorest/export-surface.ps1 | 41 + .../exports/Add-AzOracleCloudVMClusterVM.ps1 | 269 + .../Get-AzOracleAutonomousDatabase.ps1 | 229 + .../Get-AzOracleAutonomousDatabaseBackup.ps1 | 262 + ...AzOracleAutonomousDatabaseCharacterSet.ps1 | 254 + ...AutonomousDatabaseNationalCharacterSet.ps1 | 254 + .../Get-AzOracleAutonomousDatabaseVersion.ps1 | 254 + ...Get-AzOracleCloudExadataInfrastructure.ps1 | 231 + .../exports/Get-AzOracleCloudVMCluster.ps1 | 229 + .../exports/Get-AzOracleDbNode.ps1 | 263 + .../exports/Get-AzOracleDbServer.ps1 | 263 + .../exports/Get-AzOracleDbSystemShape.ps1 | 255 + .../exports/Get-AzOracleDnsPrivateView.ps1 | 255 + .../exports/Get-AzOracleDnsPrivateZone.ps1 | 255 + .../exports/Get-AzOracleGiVersion.ps1 | 255 + .../exports/Invoke-AzOracleActionDbNode.ps1 | 317 + ...e-AzOracleSwitchoverAutonomousDatabase.ps1 | 262 + .../New-AzOracleAutonomousDatabase.ps1 | 449 + .../New-AzOracleAutonomousDatabaseBackup.ps1 | 234 + ...New-AzOracleCloudExadataInfrastructure.ps1 | 357 + .../exports/New-AzOracleCloudVMCluster.ps1 | 452 + .../New-AzOracleCustomerContactObject.ps1 | 117 + .../exports/New-AzOracleNsgCidrObject.ps1 | 130 + .../exports/ProxyCmdletDefinitions.ps1 | 8208 +++++ src/Oracle/Oracle.Autorest/exports/README.md | 20 + .../Remove-AzOracleAutonomousDatabase.ps1 | 242 + ...emove-AzOracleAutonomousDatabaseBackup.ps1 | 276 + ...ove-AzOracleCloudExadataInfrastructure.ps1 | 242 + .../exports/Remove-AzOracleCloudVMCluster.ps1 | 242 + .../Remove-AzOracleCloudVMClusterVM.ps1 | 287 + .../Restore-AzOracleAutonomousDatabase.ps1 | 282 + .../Update-AzOracleAutonomousDatabase.ps1 | 482 + ...ate-AzOracleCloudExadataInfrastructure.ps1 | 398 + .../exports/Update-AzOracleCloudVMCluster.ps1 | 361 + src/Oracle/Oracle.Autorest/generate-help.ps1 | 74 + .../Oracle.Autorest/generate-portal-ux.ps1 | 374 + .../Oracle.Autorest/generated/Module.cs | 202 + .../api/Models/ActivationLinks.PowerShell.cs | 172 + .../Models/ActivationLinks.TypeConverter.cs | 147 + .../generated/api/Models/ActivationLinks.cs | 80 + .../api/Models/ActivationLinks.json.cs | 116 + .../api/Models/AddRemoveDbNode.PowerShell.cs | 164 + .../Models/AddRemoveDbNode.TypeConverter.cs | 147 + .../generated/api/Models/AddRemoveDbNode.cs | 54 + .../api/Models/AddRemoveDbNode.json.cs | 116 + .../AllConnectionStringType.PowerShell.cs | 184 + .../AllConnectionStringType.TypeConverter.cs | 147 + .../api/Models/AllConnectionStringType.cs | 126 + .../Models/AllConnectionStringType.json.cs | 115 + .../generated/api/Models/Any.PowerShell.cs | 156 + .../generated/api/Models/Any.TypeConverter.cs | 146 + .../generated/api/Models/Any.cs | 34 + .../generated/api/Models/Any.json.cs | 104 + .../api/Models/ApexDetailsType.PowerShell.cs | 172 + .../Models/ApexDetailsType.TypeConverter.cs | 147 + .../generated/api/Models/ApexDetailsType.cs | 74 + .../api/Models/ApexDetailsType.json.cs | 110 + .../Models/AutonomousDatabase.PowerShell.cs | 1108 + .../AutonomousDatabase.TypeConverter.cs | 147 + .../api/Models/AutonomousDatabase.cs | 2242 ++ .../api/Models/AutonomousDatabase.json.cs | 110 + .../AutonomousDatabaseBackup.PowerShell.cs | 372 + .../AutonomousDatabaseBackup.TypeConverter.cs | 147 + .../api/Models/AutonomousDatabaseBackup.cs | 452 + .../Models/AutonomousDatabaseBackup.json.cs | 110 + ...mousDatabaseBackupListResult.PowerShell.cs | 174 + ...sDatabaseBackupListResult.TypeConverter.cs | 149 + .../AutonomousDatabaseBackupListResult.cs | 74 + ...AutonomousDatabaseBackupListResult.json.cs | 119 + ...mousDatabaseBackupProperties.PowerShell.cs | 286 + ...sDatabaseBackupProperties.TypeConverter.cs | 149 + .../AutonomousDatabaseBackupProperties.cs | 408 + ...AutonomousDatabaseBackupProperties.json.cs | 184 + ...tonomousDatabaseBackupUpdate.PowerShell.cs | 172 + ...omousDatabaseBackupUpdate.TypeConverter.cs | 148 + .../Models/AutonomousDatabaseBackupUpdate.cs | 63 + .../AutonomousDatabaseBackupUpdate.json.cs | 108 + ...tabaseBackupUpdateProperties.PowerShell.cs | 169 + ...aseBackupUpdateProperties.TypeConverter.cs | 151 + ...utonomousDatabaseBackupUpdateProperties.cs | 56 + ...mousDatabaseBackupUpdateProperties.json.cs | 110 + ...nomousDatabaseBaseProperties.PowerShell.cs | 1004 + ...ousDatabaseBaseProperties.TypeConverter.cs | 148 + .../AutonomousDatabaseBaseProperties.cs | 2398 ++ .../AutonomousDatabaseBaseProperties.json.cs | 496 + ...tonomousDatabaseCharacterSet.PowerShell.cs | 252 + ...omousDatabaseCharacterSet.TypeConverter.cs | 148 + .../Models/AutonomousDatabaseCharacterSet.cs | 146 + .../AutonomousDatabaseCharacterSet.json.cs | 110 + ...tabaseCharacterSetListResult.PowerShell.cs | 177 + ...aseCharacterSetListResult.TypeConverter.cs | 151 + ...utonomousDatabaseCharacterSetListResult.cs | 76 + ...mousDatabaseCharacterSetListResult.json.cs | 120 + ...tabaseCharacterSetProperties.PowerShell.cs | 169 + ...aseCharacterSetProperties.TypeConverter.cs | 151 + ...utonomousDatabaseCharacterSetProperties.cs | 59 + ...mousDatabaseCharacterSetProperties.json.cs | 113 + ...omousDatabaseCloneProperties.PowerShell.cs | 1070 + ...usDatabaseCloneProperties.TypeConverter.cs | 148 + .../AutonomousDatabaseCloneProperties.cs | 892 + .../AutonomousDatabaseCloneProperties.json.cs | 145 + ...AutonomousDatabaseListResult.PowerShell.cs | 172 + ...onomousDatabaseListResult.TypeConverter.cs | 147 + .../Models/AutonomousDatabaseListResult.cs | 74 + .../AutonomousDatabaseListResult.json.cs | 118 + ...DatabaseNationalCharacterSet.PowerShell.cs | 255 + ...abaseNationalCharacterSet.TypeConverter.cs | 151 + .../AutonomousDatabaseNationalCharacterSet.cs | 146 + ...nomousDatabaseNationalCharacterSet.json.cs | 111 + ...tionalCharacterSetListResult.PowerShell.cs | 177 + ...nalCharacterSetListResult.TypeConverter.cs | 153 + ...sDatabaseNationalCharacterSetListResult.cs | 76 + ...baseNationalCharacterSetListResult.json.cs | 121 + ...tionalCharacterSetProperties.PowerShell.cs | 169 + ...nalCharacterSetProperties.TypeConverter.cs | 153 + ...sDatabaseNationalCharacterSetProperties.cs | 59 + ...baseNationalCharacterSetProperties.json.cs | 114 + ...AutonomousDatabaseProperties.PowerShell.cs | 1004 + ...onomousDatabaseProperties.TypeConverter.cs | 147 + .../Models/AutonomousDatabaseProperties.cs | 700 + .../AutonomousDatabaseProperties.json.cs | 108 + ...nomousDatabaseStandbySummary.PowerShell.cs | 196 + ...ousDatabaseStandbySummary.TypeConverter.cs | 148 + .../AutonomousDatabaseStandbySummary.cs | 157 + .../AutonomousDatabaseStandbySummary.json.cs | 116 + .../AutonomousDatabaseUpdate.PowerShell.cs | 420 + .../AutonomousDatabaseUpdate.TypeConverter.cs | 147 + .../api/Models/AutonomousDatabaseUpdate.cs | 645 + .../Models/AutonomousDatabaseUpdate.json.cs | 110 + ...mousDatabaseUpdateProperties.PowerShell.cs | 406 + ...sDatabaseUpdateProperties.TypeConverter.cs | 149 + .../AutonomousDatabaseUpdateProperties.cs | 690 + ...AutonomousDatabaseUpdateProperties.json.cs | 188 + ...AutonomousDatabaseUpdateTags.PowerShell.cs | 160 + ...onomousDatabaseUpdateTags.TypeConverter.cs | 147 + .../Models/AutonomousDatabaseUpdateTags.cs | 35 + ...AutonomousDatabaseUpdateTags.dictionary.cs | 75 + .../AutonomousDatabaseUpdateTags.json.cs | 109 + ...AutonomousDatabaseWalletFile.PowerShell.cs | 164 + ...onomousDatabaseWalletFile.TypeConverter.cs | 147 + .../Models/AutonomousDatabaseWalletFile.cs | 54 + .../AutonomousDatabaseWalletFile.json.cs | 108 + .../Models/AutonomousDbVersion.PowerShell.cs | 292 + .../AutonomousDbVersion.TypeConverter.cs | 147 + .../api/Models/AutonomousDbVersion.cs | 254 + .../api/Models/AutonomousDbVersion.json.cs | 110 + ...utonomousDbVersionListResult.PowerShell.cs | 172 + ...nomousDbVersionListResult.TypeConverter.cs | 147 + .../Models/AutonomousDbVersionListResult.cs | 74 + .../AutonomousDbVersionListResult.json.cs | 118 + ...utonomousDbVersionProperties.PowerShell.cs | 204 + ...nomousDbVersionProperties.TypeConverter.cs | 147 + .../Models/AutonomousDbVersionProperties.cs | 180 + .../AutonomousDbVersionProperties.json.cs | 136 + .../Models/CloudAccountDetails.PowerShell.cs | 172 + .../CloudAccountDetails.TypeConverter.cs | 147 + .../api/Models/CloudAccountDetails.cs | 80 + .../api/Models/CloudAccountDetails.json.cs | 116 + .../CloudExadataInfrastructure.PowerShell.cs | 628 + ...loudExadataInfrastructure.TypeConverter.cs | 147 + .../api/Models/CloudExadataInfrastructure.cs | 1101 + .../Models/CloudExadataInfrastructure.json.cs | 120 + ...dataInfrastructureListResult.PowerShell.cs | 174 + ...aInfrastructureListResult.TypeConverter.cs | 150 + .../CloudExadataInfrastructureListResult.cs | 74 + ...oudExadataInfrastructureListResult.json.cs | 119 + ...dataInfrastructureProperties.PowerShell.cs | 518 + ...aInfrastructureProperties.TypeConverter.cs | 150 + .../CloudExadataInfrastructureProperties.cs | 1085 + ...oudExadataInfrastructureProperties.json.cs | 255 + ...dExadataInfrastructureUpdate.PowerShell.cs | 300 + ...adataInfrastructureUpdate.TypeConverter.cs | 148 + .../CloudExadataInfrastructureUpdate.cs | 408 + .../CloudExadataInfrastructureUpdate.json.cs | 120 + ...frastructureUpdateProperties.PowerShell.cs | 281 + ...structureUpdateProperties.TypeConverter.cs | 151 + ...udExadataInfrastructureUpdateProperties.cs | 377 + ...dataInfrastructureUpdateProperties.json.cs | 126 + ...dataInfrastructureUpdateTags.PowerShell.cs | 162 + ...aInfrastructureUpdateTags.TypeConverter.cs | 150 + .../CloudExadataInfrastructureUpdateTags.cs | 35 + ...dataInfrastructureUpdateTags.dictionary.cs | 75 + ...oudExadataInfrastructureUpdateTags.json.cs | 110 + .../api/Models/CloudVMCluster.PowerShell.cs | 700 + .../Models/CloudVMCluster.TypeConverter.cs | 147 + .../generated/api/Models/CloudVMCluster.cs | 1248 + .../api/Models/CloudVMCluster.json.cs | 110 + .../CloudVMClusterListResult.PowerShell.cs | 172 + .../CloudVMClusterListResult.TypeConverter.cs | 147 + .../api/Models/CloudVMClusterListResult.cs | 74 + .../Models/CloudVMClusterListResult.json.cs | 118 + .../CloudVMClusterProperties.PowerShell.cs | 596 + .../CloudVMClusterProperties.TypeConverter.cs | 147 + .../api/Models/CloudVMClusterProperties.cs | 1302 + .../Models/CloudVMClusterProperties.json.cs | 366 + .../Models/CloudVMClusterUpdate.PowerShell.cs | 284 + .../CloudVMClusterUpdate.TypeConverter.cs | 147 + .../api/Models/CloudVMClusterUpdate.cs | 332 + .../api/Models/CloudVMClusterUpdate.json.cs | 110 + ...oudVMClusterUpdateProperties.PowerShell.cs | 268 + ...VMClusterUpdateProperties.TypeConverter.cs | 148 + .../Models/CloudVMClusterUpdateProperties.cs | 339 + .../CloudVMClusterUpdateProperties.json.cs | 149 + .../CloudVMClusterUpdateTags.PowerShell.cs | 160 + .../CloudVMClusterUpdateTags.TypeConverter.cs | 147 + .../api/Models/CloudVMClusterUpdateTags.cs | 35 + .../CloudVMClusterUpdateTags.dictionary.cs | 75 + .../Models/CloudVMClusterUpdateTags.json.cs | 109 + .../Models/ConnectionStringType.PowerShell.cs | 228 + .../ConnectionStringType.TypeConverter.cs | 147 + .../api/Models/ConnectionStringType.cs | 273 + .../api/Models/ConnectionStringType.json.cs | 126 + .../Models/ConnectionUrlType.PowerShell.cs | 216 + .../Models/ConnectionUrlType.TypeConverter.cs | 147 + .../generated/api/Models/ConnectionUrlType.cs | 191 + .../api/Models/ConnectionUrlType.json.cs | 123 + .../api/Models/CustomerContact.PowerShell.cs | 164 + .../Models/CustomerContact.TypeConverter.cs | 147 + .../generated/api/Models/CustomerContact.cs | 60 + .../api/Models/CustomerContact.json.cs | 108 + .../DataCollectionOptions.PowerShell.cs | 180 + .../DataCollectionOptions.TypeConverter.cs | 147 + .../api/Models/DataCollectionOptions.cs | 112 + .../api/Models/DataCollectionOptions.json.cs | 112 + .../api/Models/DayOfWeek.PowerShell.cs | 164 + .../api/Models/DayOfWeek.TypeConverter.cs | 146 + .../generated/api/Models/DayOfWeek.cs | 56 + .../generated/api/Models/DayOfWeek.json.cs | 106 + .../api/Models/DayOfWeekUpdate.PowerShell.cs | 164 + .../Models/DayOfWeekUpdate.TypeConverter.cs | 147 + .../generated/api/Models/DayOfWeekUpdate.cs | 56 + .../api/Models/DayOfWeekUpdate.json.cs | 108 + .../api/Models/DbIormConfig.PowerShell.cs | 180 + .../api/Models/DbIormConfig.TypeConverter.cs | 147 + .../generated/api/Models/DbIormConfig.cs | 103 + .../generated/api/Models/DbIormConfig.json.cs | 110 + .../generated/api/Models/DbNode.PowerShell.cs | 428 + .../api/Models/DbNode.TypeConverter.cs | 146 + .../generated/api/Models/DbNode.cs | 601 + .../generated/api/Models/DbNode.json.cs | 108 + .../api/Models/DbNodeAction.PowerShell.cs | 164 + .../api/Models/DbNodeAction.TypeConverter.cs | 147 + .../generated/api/Models/DbNodeAction.cs | 56 + .../generated/api/Models/DbNodeAction.json.cs | 106 + .../api/Models/DbNodeListResult.PowerShell.cs | 172 + .../Models/DbNodeListResult.TypeConverter.cs | 147 + .../generated/api/Models/DbNodeListResult.cs | 74 + .../api/Models/DbNodeListResult.json.cs | 118 + .../api/Models/DbNodeProperties.PowerShell.cs | 340 + .../Models/DbNodeProperties.TypeConverter.cs | 147 + .../generated/api/Models/DbNodeProperties.cs | 578 + .../api/Models/DbNodeProperties.json.cs | 221 + .../api/Models/DbServer.PowerShell.cs | 436 + .../api/Models/DbServer.TypeConverter.cs | 146 + .../generated/api/Models/DbServer.cs | 609 + .../generated/api/Models/DbServer.json.cs | 108 + .../Models/DbServerListResult.PowerShell.cs | 172 + .../DbServerListResult.TypeConverter.cs | 147 + .../api/Models/DbServerListResult.cs | 74 + .../api/Models/DbServerListResult.json.cs | 118 + .../DbServerPatchingDetails.PowerShell.cs | 188 + .../DbServerPatchingDetails.TypeConverter.cs | 147 + .../api/Models/DbServerPatchingDetails.cs | 128 + .../Models/DbServerPatchingDetails.json.cs | 126 + .../Models/DbServerProperties.PowerShell.cs | 348 + .../DbServerProperties.TypeConverter.cs | 147 + .../api/Models/DbServerProperties.cs | 581 + .../api/Models/DbServerProperties.json.cs | 238 + .../api/Models/DbSystemShape.PowerShell.cs | 404 + .../api/Models/DbSystemShape.TypeConverter.cs | 147 + .../generated/api/Models/DbSystemShape.cs | 589 + .../api/Models/DbSystemShape.json.cs | 108 + .../DbSystemShapeListResult.PowerShell.cs | 172 + .../DbSystemShapeListResult.TypeConverter.cs | 147 + .../api/Models/DbSystemShapeListResult.cs | 74 + .../Models/DbSystemShapeListResult.json.cs | 118 + .../DbSystemShapeProperties.PowerShell.cs | 316 + .../DbSystemShapeProperties.TypeConverter.cs | 147 + .../api/Models/DbSystemShapeProperties.cs | 557 + .../Models/DbSystemShapeProperties.json.cs | 206 + .../api/Models/DnsPrivateView.PowerShell.cs | 308 + .../Models/DnsPrivateView.TypeConverter.cs | 147 + .../generated/api/Models/DnsPrivateView.cs | 296 + .../api/Models/DnsPrivateView.json.cs | 110 + .../DnsPrivateViewListResult.PowerShell.cs | 172 + .../DnsPrivateViewListResult.TypeConverter.cs | 147 + .../api/Models/DnsPrivateViewListResult.cs | 74 + .../Models/DnsPrivateViewListResult.json.cs | 118 + .../DnsPrivateViewProperties.PowerShell.cs | 220 + .../DnsPrivateViewProperties.TypeConverter.cs | 147 + .../api/Models/DnsPrivateViewProperties.cs | 228 + .../Models/DnsPrivateViewProperties.json.cs | 146 + .../api/Models/DnsPrivateZone.PowerShell.cs | 324 + .../Models/DnsPrivateZone.TypeConverter.cs | 147 + .../generated/api/Models/DnsPrivateZone.cs | 362 + .../api/Models/DnsPrivateZone.json.cs | 110 + .../DnsPrivateZoneListResult.PowerShell.cs | 172 + .../DnsPrivateZoneListResult.TypeConverter.cs | 147 + .../api/Models/DnsPrivateZoneListResult.cs | 74 + .../Models/DnsPrivateZoneListResult.json.cs | 118 + .../DnsPrivateZoneProperties.PowerShell.cs | 236 + .../DnsPrivateZoneProperties.TypeConverter.cs | 147 + .../api/Models/DnsPrivateZoneProperties.cs | 300 + .../Models/DnsPrivateZoneProperties.json.cs | 156 + .../Models/ErrorAdditionalInfo.PowerShell.cs | 172 + .../ErrorAdditionalInfo.TypeConverter.cs | 147 + .../api/Models/ErrorAdditionalInfo.cs | 80 + .../api/Models/ErrorAdditionalInfo.json.cs | 116 + .../api/Models/ErrorDetail.PowerShell.cs | 196 + .../api/Models/ErrorDetail.TypeConverter.cs | 147 + .../generated/api/Models/ErrorDetail.cs | 149 + .../generated/api/Models/ErrorDetail.json.cs | 145 + .../api/Models/ErrorResponse.PowerShell.cs | 208 + .../api/Models/ErrorResponse.TypeConverter.cs | 147 + .../generated/api/Models/ErrorResponse.cs | 151 + .../api/Models/ErrorResponse.json.cs | 109 + .../EstimatedPatchingTime.PowerShell.cs | 192 + .../EstimatedPatchingTime.TypeConverter.cs | 147 + .../api/Models/EstimatedPatchingTime.cs | 131 + .../api/Models/EstimatedPatchingTime.json.cs | 129 + .../Models/ExadataIormConfig.PowerShell.cs | 188 + .../Models/ExadataIormConfig.TypeConverter.cs | 147 + .../generated/api/Models/ExadataIormConfig.cs | 118 + .../api/Models/ExadataIormConfig.json.cs | 122 + ...onomousDatabaseWalletDetails.PowerShell.cs | 183 + ...mousDatabaseWalletDetails.TypeConverter.cs | 151 + ...GenerateAutonomousDatabaseWalletDetails.cs | 102 + ...ateAutonomousDatabaseWalletDetails.json.cs | 114 + .../api/Models/GiVersion.PowerShell.cs | 252 + .../api/Models/GiVersion.TypeConverter.cs | 146 + .../generated/api/Models/GiVersion.cs | 146 + .../generated/api/Models/GiVersion.json.cs | 108 + .../Models/GiVersionListResult.PowerShell.cs | 172 + .../GiVersionListResult.TypeConverter.cs | 147 + .../api/Models/GiVersionListResult.cs | 74 + .../api/Models/GiVersionListResult.json.cs | 118 + .../Models/GiVersionProperties.PowerShell.cs | 164 + .../GiVersionProperties.TypeConverter.cs | 147 + .../api/Models/GiVersionProperties.cs | 57 + .../api/Models/GiVersionProperties.json.cs | 111 + ...ongTermBackUpScheduleDetails.PowerShell.cs | 188 + ...TermBackUpScheduleDetails.TypeConverter.cs | 147 + .../Models/LongTermBackUpScheduleDetails.cs | 131 + .../LongTermBackUpScheduleDetails.json.cs | 114 + .../Models/MaintenanceWindow.PowerShell.cs | 236 + .../Models/MaintenanceWindow.TypeConverter.cs | 147 + .../generated/api/Models/MaintenanceWindow.cs | 298 + .../api/Models/MaintenanceWindow.json.cs | 158 + .../generated/api/Models/Month.PowerShell.cs | 164 + .../api/Models/Month.TypeConverter.cs | 146 + .../generated/api/Models/Month.cs | 56 + .../generated/api/Models/Month.json.cs | 106 + .../api/Models/NsgCidr.PowerShell.cs | 188 + .../api/Models/NsgCidr.TypeConverter.cs | 146 + .../generated/api/Models/NsgCidr.cs | 121 + .../generated/api/Models/NsgCidr.json.cs | 108 + .../api/Models/Operation.PowerShell.cs | 230 + .../api/Models/Operation.TypeConverter.cs | 146 + .../generated/api/Models/Operation.cs | 284 + .../generated/api/Models/Operation.json.cs | 128 + .../api/Models/OperationDisplay.PowerShell.cs | 188 + .../Models/OperationDisplay.TypeConverter.cs | 147 + .../generated/api/Models/OperationDisplay.cs | 153 + .../api/Models/OperationDisplay.json.cs | 126 + .../Models/OperationListResult.PowerShell.cs | 176 + .../OperationListResult.TypeConverter.cs | 147 + .../api/Models/OperationListResult.cs | 85 + .../api/Models/OperationListResult.json.cs | 127 + .../api/Models/OracleIdentity.PowerShell.cs | 306 + .../Models/OracleIdentity.TypeConverter.cs | 157 + .../generated/api/Models/OracleIdentity.cs | 411 + .../api/Models/OracleIdentity.json.cs | 143 + .../Models/OracleSubscription.PowerShell.cs | 348 + .../OracleSubscription.TypeConverter.cs | 147 + .../api/Models/OracleSubscription.cs | 375 + .../api/Models/OracleSubscription.json.cs | 112 + ...OracleSubscriptionListResult.PowerShell.cs | 172 + ...cleSubscriptionListResult.TypeConverter.cs | 147 + .../Models/OracleSubscriptionListResult.cs | 74 + .../OracleSubscriptionListResult.json.cs | 118 + ...OracleSubscriptionProperties.PowerShell.cs | 212 + ...cleSubscriptionProperties.TypeConverter.cs | 147 + .../Models/OracleSubscriptionProperties.cs | 192 + .../OracleSubscriptionProperties.json.cs | 139 + .../OracleSubscriptionUpdate.PowerShell.cs | 228 + .../OracleSubscriptionUpdate.TypeConverter.cs | 147 + .../api/Models/OracleSubscriptionUpdate.cs | 194 + .../Models/OracleSubscriptionUpdate.json.cs | 110 + ...SubscriptionUpdateProperties.PowerShell.cs | 174 + ...scriptionUpdateProperties.TypeConverter.cs | 149 + .../OracleSubscriptionUpdateProperties.cs | 76 + ...OracleSubscriptionUpdateProperties.json.cs | 115 + .../api/Models/PeerDbDetails.PowerShell.cs | 164 + .../api/Models/PeerDbDetails.TypeConverter.cs | 147 + .../generated/api/Models/PeerDbDetails.cs | 63 + .../api/Models/PeerDbDetails.json.cs | 106 + .../generated/api/Models/Plan.PowerShell.cs | 196 + .../api/Models/Plan.TypeConverter.cs | 146 + .../generated/api/Models/Plan.cs | 149 + .../generated/api/Models/Plan.json.cs | 114 + .../api/Models/PlanUpdate.PowerShell.cs | 196 + .../api/Models/PlanUpdate.TypeConverter.cs | 146 + .../generated/api/Models/PlanUpdate.cs | 149 + .../generated/api/Models/PlanUpdate.json.cs | 114 + .../api/Models/PortRange.PowerShell.cs | 172 + .../api/Models/PortRange.TypeConverter.cs | 146 + .../generated/api/Models/PortRange.cs | 89 + .../generated/api/Models/PortRange.json.cs | 108 + .../PrivateIPAddressProperties.PowerShell.cs | 196 + ...rivateIPAddressProperties.TypeConverter.cs | 147 + .../api/Models/PrivateIPAddressProperties.cs | 134 + .../Models/PrivateIPAddressProperties.json.cs | 116 + .../PrivateIPAddressesFilter.PowerShell.cs | 172 + .../PrivateIPAddressesFilter.TypeConverter.cs | 147 + .../api/Models/PrivateIPAddressesFilter.cs | 74 + .../Models/PrivateIPAddressesFilter.json.cs | 110 + .../api/Models/ProfileType.PowerShell.cs | 232 + .../api/Models/ProfileType.TypeConverter.cs | 147 + .../generated/api/Models/ProfileType.cs | 252 + .../generated/api/Models/ProfileType.json.cs | 125 + .../api/Models/ProxyResource.PowerShell.cs | 238 + .../api/Models/ProxyResource.TypeConverter.cs | 147 + .../generated/api/Models/ProxyResource.cs | 112 + .../api/Models/ProxyResource.json.cs | 108 + .../api/Models/Resource.PowerShell.cs | 238 + .../api/Models/Resource.TypeConverter.cs | 146 + .../generated/api/Models/Resource.cs | 239 + .../generated/api/Models/Resource.json.cs | 126 + ...oreAutonomousDatabaseDetails.PowerShell.cs | 164 + ...AutonomousDatabaseDetails.TypeConverter.cs | 148 + .../RestoreAutonomousDatabaseDetails.cs | 54 + .../RestoreAutonomousDatabaseDetails.json.cs | 108 + .../SaasSubscriptionDetails.PowerShell.cs | 252 + .../SaasSubscriptionDetails.TypeConverter.cs | 147 + .../api/Models/SaasSubscriptionDetails.cs | 314 + .../Models/SaasSubscriptionDetails.json.cs | 166 + .../ScheduledOperationsType.PowerShell.cs | 188 + .../ScheduledOperationsType.TypeConverter.cs | 147 + .../api/Models/ScheduledOperationsType.cs | 105 + .../Models/ScheduledOperationsType.json.cs | 112 + ...cheduledOperationsTypeUpdate.PowerShell.cs | 188 + ...duledOperationsTypeUpdate.TypeConverter.cs | 147 + .../Models/ScheduledOperationsTypeUpdate.cs | 105 + .../ScheduledOperationsTypeUpdate.json.cs | 112 + .../api/Models/SystemData.PowerShell.cs | 204 + .../api/Models/SystemData.TypeConverter.cs | 146 + .../generated/api/Models/SystemData.cs | 158 + .../generated/api/Models/SystemData.json.cs | 116 + .../api/Models/SystemVersion.PowerShell.cs | 252 + .../api/Models/SystemVersion.TypeConverter.cs | 147 + .../generated/api/Models/SystemVersion.cs | 146 + .../api/Models/SystemVersion.json.cs | 108 + .../SystemVersionListResult.PowerShell.cs | 172 + .../SystemVersionListResult.TypeConverter.cs | 147 + .../api/Models/SystemVersionListResult.cs | 74 + .../Models/SystemVersionListResult.json.cs | 118 + .../SystemVersionProperties.PowerShell.cs | 164 + .../SystemVersionProperties.TypeConverter.cs | 147 + .../api/Models/SystemVersionProperties.cs | 57 + .../Models/SystemVersionProperties.json.cs | 111 + .../Models/SystemVersionsFilter.PowerShell.cs | 180 + .../SystemVersionsFilter.TypeConverter.cs | 147 + .../api/Models/SystemVersionsFilter.cs | 94 + .../api/Models/SystemVersionsFilter.json.cs | 112 + .../api/Models/TrackedResource.PowerShell.cs | 254 + .../Models/TrackedResource.TypeConverter.cs | 147 + .../generated/api/Models/TrackedResource.cs | 152 + .../api/Models/TrackedResource.json.cs | 117 + .../Models/TrackedResourceTags.PowerShell.cs | 160 + .../TrackedResourceTags.TypeConverter.cs | 147 + .../api/Models/TrackedResourceTags.cs | 35 + .../Models/TrackedResourceTags.dictionary.cs | 75 + .../api/Models/TrackedResourceTags.json.cs | 109 + .../api/Models/ValidationError.PowerShell.cs | 172 + .../Models/ValidationError.TypeConverter.cs | 147 + .../generated/api/Models/ValidationError.cs | 74 + .../api/Models/ValidationError.json.cs | 110 + .../api/Models/ValidationResult.PowerShell.cs | 188 + .../Models/ValidationResult.TypeConverter.cs | 147 + .../generated/api/Models/ValidationResult.cs | 105 + .../api/Models/ValidationResult.json.cs | 113 + .../VirtualNetworkAddress.PowerShell.cs | 308 + .../VirtualNetworkAddress.TypeConverter.cs | 147 + .../api/Models/VirtualNetworkAddress.cs | 296 + .../api/Models/VirtualNetworkAddress.json.cs | 110 + ...tualNetworkAddressListResult.PowerShell.cs | 172 + ...lNetworkAddressListResult.TypeConverter.cs | 148 + .../Models/VirtualNetworkAddressListResult.cs | 74 + .../VirtualNetworkAddressListResult.json.cs | 118 + ...tualNetworkAddressProperties.PowerShell.cs | 220 + ...lNetworkAddressProperties.TypeConverter.cs | 148 + .../Models/VirtualNetworkAddressProperties.cs | 228 + .../VirtualNetworkAddressProperties.json.cs | 146 + .../Oracle.Autorest/generated/api/Oracle.cs | 27340 ++++++++++++++++ ...AddAzOracleCloudVMClusterVM_AddExpanded.cs | 605 + ...CloudVMClusterVM_AddViaIdentityExpanded.cs | 583 + ...acleCloudVMClusterVM_AddViaJsonFilePath.cs | 606 + ...OracleCloudVMClusterVM_AddViaJsonString.cs | 604 + ...GetAzOracleAutonomousDatabaseBackup_Get.cs | 521 + ...AutonomousDatabaseBackup_GetViaIdentity.cs | 489 + ...Backup_GetViaIdentityAutonomousDatabase.cs | 501 + ...etAzOracleAutonomousDatabaseBackup_List.cs | 534 + ...racleAutonomousDatabaseCharacterSet_Get.cs | 507 + ...mousDatabaseCharacterSet_GetViaIdentity.cs | 485 + ...baseCharacterSet_GetViaIdentityLocation.cs | 497 + ...acleAutonomousDatabaseCharacterSet_List.cs | 520 + ...onomousDatabaseNationalCharacterSet_Get.cs | 507 + ...baseNationalCharacterSet_GetViaIdentity.cs | 486 + ...onalCharacterSet_GetViaIdentityLocation.cs | 497 + ...nomousDatabaseNationalCharacterSet_List.cs | 520 + ...etAzOracleAutonomousDatabaseVersion_Get.cs | 507 + ...utonomousDatabaseVersion_GetViaIdentity.cs | 485 + ...sDatabaseVersion_GetViaIdentityLocation.cs | 496 + ...tAzOracleAutonomousDatabaseVersion_List.cs | 520 + .../GetAzOracleAutonomousDatabase_Get.cs | 508 + ...OracleAutonomousDatabase_GetViaIdentity.cs | 485 + .../GetAzOracleAutonomousDatabase_List.cs | 506 + .../GetAzOracleAutonomousDatabase_List1.cs | 520 + ...tAzOracleCloudExadataInfrastructure_Get.cs | 508 + ...oudExadataInfrastructure_GetViaIdentity.cs | 485 + ...AzOracleCloudExadataInfrastructure_List.cs | 506 + ...zOracleCloudExadataInfrastructure_List1.cs | 520 + .../cmdlets/GetAzOracleCloudVMCluster_Get.cs | 508 + ...etAzOracleCloudVMCluster_GetViaIdentity.cs | 485 + .../cmdlets/GetAzOracleCloudVMCluster_List.cs | 506 + .../GetAzOracleCloudVMCluster_List1.cs | 520 + .../cmdlets/GetAzOracleDbNode_Get.cs | 522 + .../GetAzOracleDbNode_GetViaIdentity.cs | 489 + ...acleDbNode_GetViaIdentityCloudVMCluster.cs | 501 + .../cmdlets/GetAzOracleDbNode_List.cs | 534 + .../cmdlets/GetAzOracleDbServer_Get.cs | 522 + .../GetAzOracleDbServer_GetViaIdentity.cs | 489 + ...etViaIdentityCloudExadataInfrastructure.cs | 503 + .../cmdlets/GetAzOracleDbServer_List.cs | 534 + .../cmdlets/GetAzOracleDbSystemShape_Get.cs | 508 + ...GetAzOracleDbSystemShape_GetViaIdentity.cs | 485 + ...cleDbSystemShape_GetViaIdentityLocation.cs | 497 + .../cmdlets/GetAzOracleDbSystemShape_List.cs | 520 + .../cmdlets/GetAzOracleDnsPrivateView_Get.cs | 508 + ...etAzOracleDnsPrivateView_GetViaIdentity.cs | 485 + ...leDnsPrivateView_GetViaIdentityLocation.cs | 497 + .../cmdlets/GetAzOracleDnsPrivateView_List.cs | 520 + .../cmdlets/GetAzOracleDnsPrivateZone_Get.cs | 508 + ...etAzOracleDnsPrivateZone_GetViaIdentity.cs | 485 + ...leDnsPrivateZone_GetViaIdentityLocation.cs | 497 + .../cmdlets/GetAzOracleDnsPrivateZone_List.cs | 520 + .../cmdlets/GetAzOracleGiVersion_Get.cs | 508 + .../GetAzOracleGiVersion_GetViaIdentity.cs | 485 + ...zOracleGiVersion_GetViaIdentityLocation.cs | 497 + .../cmdlets/GetAzOracleGiVersion_List.cs | 520 + .../cmdlets/GetAzOracleOperation_List.cs | 485 + ...vokeAzOracleActionDbNode_ActionExpanded.cs | 620 + ...ActionViaIdentityCloudVMClusterExpanded.cs | 602 + ...eActionDbNode_ActionViaIdentityExpanded.cs | 587 + ...racleActionDbNode_ActionViaJsonFilePath.cs | 621 + ...zOracleActionDbNode_ActionViaJsonString.cs | 619 + ...erAutonomousDatabase_SwitchoverExpanded.cs | 610 + ...sDatabase_SwitchoverViaIdentityExpanded.cs | 588 + ...omousDatabase_SwitchoverViaJsonFilePath.cs | 609 + ...onomousDatabase_SwitchoverViaJsonString.cs | 607 + ...AutonomousDatabaseBackup_CreateExpanded.cs | 630 + ...ousDatabaseBackup_CreateViaJsonFilePath.cs | 623 + ...omousDatabaseBackup_CreateViaJsonString.cs | 619 + ...OracleAutonomousDatabase_CreateExpanded.cs | 978 + ...utonomousDatabase_CreateViaJsonFilePath.cs | 607 + ...eAutonomousDatabase_CreateViaJsonString.cs | 605 + ...oudExadataInfrastructure_CreateExpanded.cs | 826 + ...ataInfrastructure_CreateViaJsonFilePath.cs | 609 + ...adataInfrastructure_CreateViaJsonString.cs | 607 + ...ewAzOracleCloudVMCluster_CreateExpanded.cs | 969 + ...cleCloudVMCluster_CreateViaJsonFilePath.cs | 607 + ...racleCloudVMCluster_CreateViaJsonString.cs | 605 + ...AzOracleAutonomousDatabaseBackup_Delete.cs | 625 + ...onomousDatabaseBackup_DeleteViaIdentity.cs | 594 + ...kup_DeleteViaIdentityAutonomousDatabase.cs | 607 + ...RemoveAzOracleAutonomousDatabase_Delete.cs | 611 + ...cleAutonomousDatabase_DeleteViaIdentity.cs | 588 + ...OracleCloudExadataInfrastructure_Delete.cs | 611 + ...ExadataInfrastructure_DeleteViaIdentity.cs | 590 + .../RemoveAzOracleCloudVMClusterVM_Remove.cs | 604 + ...AzOracleCloudVMClusterVM_RemoveExpanded.cs | 605 + ...racleCloudVMClusterVM_RemoveViaIdentity.cs | 582 + ...udVMClusterVM_RemoveViaIdentityExpanded.cs | 585 + ...eCloudVMClusterVM_RemoveViaJsonFilePath.cs | 606 + ...cleCloudVMClusterVM_RemoveViaJsonString.cs | 604 + .../RemoveAzOracleCloudVMCluster_Delete.cs | 611 + ...zOracleCloudVMCluster_DeleteViaIdentity.cs | 588 + ...storeAzOracleAutonomousDatabase_Restore.cs | 605 + ...racleAutonomousDatabase_RestoreExpanded.cs | 605 + ...leAutonomousDatabase_RestoreViaIdentity.cs | 582 + ...mousDatabase_RestoreViaIdentityExpanded.cs | 584 + ...tonomousDatabase_RestoreViaJsonFilePath.cs | 609 + ...AutonomousDatabase_RestoreViaJsonString.cs | 605 + ...OracleAutonomousDatabase_UpdateExpanded.cs | 948 + ...omousDatabase_UpdateViaIdentityExpanded.cs | 927 + ...utonomousDatabase_UpdateViaJsonFilePath.cs | 607 + ...eAutonomousDatabase_UpdateViaJsonString.cs | 605 + ...oudExadataInfrastructure_UpdateExpanded.cs | 804 + ...nfrastructure_UpdateViaIdentityExpanded.cs | 784 + ...ataInfrastructure_UpdateViaJsonFilePath.cs | 610 + ...adataInfrastructure_UpdateViaJsonString.cs | 607 + ...teAzOracleCloudVMCluster_UpdateExpanded.cs | 764 + ...loudVMCluster_UpdateViaIdentityExpanded.cs | 741 + ...cleCloudVMCluster_UpdateViaJsonFilePath.cs | 607 + ...racleCloudVMCluster_UpdateViaJsonString.cs | 605 + .../generated/runtime/AsyncCommandRuntime.cs | 832 + .../generated/runtime/AsyncJob.cs | 270 + .../runtime/AsyncOperationResponse.cs | 176 + .../Attributes/ExternalDocsAttribute.cs | 30 + .../PSArgumentCompleterAttribute.cs | 52 + .../BuildTime/Cmdlets/ExportCmdletSurface.cs | 113 + .../BuildTime/Cmdlets/ExportExampleStub.cs | 74 + .../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 103 + .../BuildTime/Cmdlets/ExportHelpMarkdown.cs | 56 + .../BuildTime/Cmdlets/ExportModelSurface.cs | 117 + .../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 180 + .../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 193 + .../BuildTime/Cmdlets/ExportTestStub.cs | 197 + .../BuildTime/Cmdlets/GetCommonParameter.cs | 52 + .../BuildTime/Cmdlets/GetModuleGuid.cs | 31 + .../BuildTime/Cmdlets/GetScriptCmdlet.cs | 54 + .../runtime/BuildTime/CollectionExtensions.cs | 20 + .../runtime/BuildTime/MarkdownRenderer.cs | 122 + .../runtime/BuildTime/Models/PsFormatTypes.cs | 138 + .../BuildTime/Models/PsHelpMarkdownOutputs.cs | 199 + .../runtime/BuildTime/Models/PsHelpTypes.cs | 202 + .../BuildTime/Models/PsMarkdownTypes.cs | 329 + .../BuildTime/Models/PsProxyOutputs.cs | 662 + .../runtime/BuildTime/Models/PsProxyTypes.cs | 544 + .../runtime/BuildTime/PsAttributes.cs | 131 + .../runtime/BuildTime/PsExtensions.cs | 176 + .../generated/runtime/BuildTime/PsHelpers.cs | 105 + .../runtime/BuildTime/StringExtensions.cs | 24 + .../runtime/BuildTime/XmlExtensions.cs | 28 + .../generated/runtime/CmdInfoHandler.cs | 40 + .../generated/runtime/Context.cs | 33 + .../Conversions/ConversionException.cs | 17 + .../runtime/Conversions/IJsonConverter.cs | 13 + .../Conversions/Instances/BinaryConverter.cs | 24 + .../Conversions/Instances/BooleanConverter.cs | 13 + .../Instances/DateTimeConverter.cs | 18 + .../Instances/DateTimeOffsetConverter.cs | 15 + .../Conversions/Instances/DecimalConverter.cs | 16 + .../Conversions/Instances/DoubleConverter.cs | 13 + .../Conversions/Instances/EnumConverter.cs | 30 + .../Conversions/Instances/GuidConverter.cs | 15 + .../Instances/HashSet'1Converter.cs | 27 + .../Conversions/Instances/Int16Converter.cs | 13 + .../Conversions/Instances/Int32Converter.cs | 13 + .../Conversions/Instances/Int64Converter.cs | 13 + .../Instances/JsonArrayConverter.cs | 13 + .../Instances/JsonObjectConverter.cs | 13 + .../Conversions/Instances/SingleConverter.cs | 13 + .../Conversions/Instances/StringConverter.cs | 13 + .../Instances/TimeSpanConverter.cs | 15 + .../Conversions/Instances/UInt16Converter.cs | 13 + .../Conversions/Instances/UInt32Converter.cs | 13 + .../Conversions/Instances/UInt64Converter.cs | 13 + .../Conversions/Instances/UriConverter.cs | 15 + .../runtime/Conversions/JsonConverter.cs | 21 + .../Conversions/JsonConverterAttribute.cs | 18 + .../Conversions/JsonConverterFactory.cs | 91 + .../Conversions/StringLikeConverter.cs | 45 + .../Customizations/IJsonSerializable.cs | 263 + .../runtime/Customizations/JsonArray.cs | 13 + .../runtime/Customizations/JsonBoolean.cs | 16 + .../runtime/Customizations/JsonNode.cs | 21 + .../runtime/Customizations/JsonNumber.cs | 78 + .../runtime/Customizations/JsonObject.cs | 183 + .../runtime/Customizations/JsonString.cs | 34 + .../runtime/Customizations/XNodeArray.cs | 44 + .../generated/runtime/Debugging.cs | 28 + .../generated/runtime/DictionaryExtensions.cs | 33 + .../generated/runtime/EventData.cs | 78 + .../generated/runtime/EventDataExtensions.cs | 94 + .../generated/runtime/EventListener.cs | 247 + .../generated/runtime/Events.cs | 27 + .../generated/runtime/EventsExtensions.cs | 27 + .../generated/runtime/Extensions.cs | 117 + .../Extensions/StringBuilderExtensions.cs | 23 + .../Helpers/Extensions/TypeExtensions.cs | 61 + .../generated/runtime/Helpers/Seperator.cs | 11 + .../generated/runtime/Helpers/TypeDetails.cs | 116 + .../generated/runtime/Helpers/XHelper.cs | 75 + .../generated/runtime/HttpPipeline.cs | 88 + .../generated/runtime/HttpPipelineMocking.ps1 | 110 + .../generated/runtime/IAssociativeArray.cs | 24 + .../generated/runtime/IHeaderSerializable.cs | 14 + .../generated/runtime/ISendAsync.cs | 413 + .../generated/runtime/InfoAttribute.cs | 38 + .../generated/runtime/InputHandler.cs | 22 + .../generated/runtime/Iso/IsoDate.cs | 214 + .../generated/runtime/JsonType.cs | 18 + .../generated/runtime/MessageAttribute.cs | 350 + .../runtime/MessageAttributeHelper.cs | 184 + .../generated/runtime/Method.cs | 19 + .../generated/runtime/Models/JsonMember.cs | 83 + .../generated/runtime/Models/JsonModel.cs | 89 + .../runtime/Models/JsonModelCache.cs | 19 + .../runtime/Nodes/Collections/JsonArray.cs | 65 + .../Nodes/Collections/XImmutableArray.cs | 62 + .../runtime/Nodes/Collections/XList.cs | 64 + .../runtime/Nodes/Collections/XNodeArray.cs | 73 + .../runtime/Nodes/Collections/XSet.cs | 60 + .../generated/runtime/Nodes/JsonBoolean.cs | 42 + .../generated/runtime/Nodes/JsonDate.cs | 173 + .../generated/runtime/Nodes/JsonNode.cs | 250 + .../generated/runtime/Nodes/JsonNumber.cs | 109 + .../generated/runtime/Nodes/JsonObject.cs | 172 + .../generated/runtime/Nodes/JsonString.cs | 42 + .../generated/runtime/Nodes/XBinary.cs | 40 + .../generated/runtime/Nodes/XNull.cs | 15 + .../Parser/Exceptions/ParseException.cs | 24 + .../generated/runtime/Parser/JsonParser.cs | 180 + .../generated/runtime/Parser/JsonToken.cs | 66 + .../generated/runtime/Parser/JsonTokenizer.cs | 177 + .../generated/runtime/Parser/Location.cs | 43 + .../runtime/Parser/Readers/SourceReader.cs | 130 + .../generated/runtime/Parser/TokenReader.cs | 39 + .../generated/runtime/PipelineMocking.cs | 262 + .../runtime/Properties/Resources.Designer.cs | 5655 ++++ .../runtime/Properties/Resources.resx | 1747 + .../generated/runtime/Response.cs | 27 + .../runtime/Serialization/JsonSerializer.cs | 350 + .../Serialization/PropertyTransformation.cs | 21 + .../Serialization/SerializationOptions.cs | 65 + .../generated/runtime/SerializationMode.cs | 18 + .../runtime/TypeConverterExtensions.cs | 261 + .../runtime/UndeclaredResponseException.cs | 112 + .../generated/runtime/Writers/JsonWriter.cs | 223 + .../generated/runtime/delegates.cs | 23 + .../help/Add-AzOracleCloudVMClusterVM.md | 261 + src/Oracle/Oracle.Autorest/help/Az.Oracle.md | 106 + .../help/Get-AzOracleAutonomousDatabase.md | 201 + .../Get-AzOracleAutonomousDatabaseBackup.md | 186 + ...-AzOracleAutonomousDatabaseCharacterSet.md | 166 + ...eAutonomousDatabaseNationalCharacterSet.md | 165 + .../Get-AzOracleAutonomousDatabaseVersion.md | 168 + .../Get-AzOracleCloudExadataInfrastructure.md | 189 + .../help/Get-AzOracleCloudVMCluster.md | 185 + .../help/Get-AzOracleDbNode.md | 182 + .../help/Get-AzOracleDbServer.md | 183 + .../help/Get-AzOracleDbSystemShape.md | 192 + .../help/Get-AzOracleDnsPrivateView.md | 167 + .../help/Get-AzOracleDnsPrivateZone.md | 167 + .../help/Get-AzOracleGiVersion.md | 166 + .../help/Invoke-AzOracleActionDbNode.md | 387 + ...ke-AzOracleSwitchoverAutonomousDatabase.md | 255 + .../help/New-AzOracleAutonomousDatabase.md | 795 + .../New-AzOracleAutonomousDatabaseBackup.md | 264 + .../New-AzOracleCloudExadataInfrastructure.md | 531 + .../help/New-AzOracleCloudVMCluster.md | 767 + .../help/New-AzOracleCustomerContactObject.md | 61 + .../help/New-AzOracleNsgCidrObject.md | 93 + src/Oracle/Oracle.Autorest/help/README.md | 11 + .../help/Remove-AzOracleAutonomousDatabase.md | 216 + ...Remove-AzOracleAutonomousDatabaseBackup.md | 247 + ...move-AzOracleCloudExadataInfrastructure.md | 217 + .../help/Remove-AzOracleCloudVMCluster.md | 216 + .../help/Remove-AzOracleCloudVMClusterVM.md | 291 + .../Restore-AzOracleAutonomousDatabase.md | 286 + .../help/Update-AzOracleAutonomousDatabase.md | 758 + ...date-AzOracleCloudExadataInfrastructure.md | 567 + .../help/Update-AzOracleCloudVMCluster.md | 535 + src/Oracle/Oracle.Autorest/how-to.md | 58 + .../internal/Az.Oracle.internal.psm1 | 38 + .../internal/Get-AzOracleOperation.ps1 | 125 + .../internal/ProxyCmdletDefinitions.ps1 | 125 + src/Oracle/Oracle.Autorest/internal/README.md | 14 + src/Oracle/Oracle.Autorest/pack-module.ps1 | 17 + src/Oracle/Oracle.Autorest/run-module.ps1 | 62 + src/Oracle/Oracle.Autorest/test-module.ps1 | 98 + ...dd-AzOracleCloudVMClusterVM.Recording.json | 89 + .../Add-AzOracleCloudVMClusterVM.Tests.ps1 | 40 + .../test/AzAdbs.Recording.json | 1940 ++ .../Oracle.Autorest/test/AzAdbs.Tests.ps1 | 50 + .../test/AzAdbsBackup.Recording.json | 131 + .../test/AzAdbsBackup.Tests.ps1 | 33 + .../test/AzExaInfra.Recording.json | 532 + .../Oracle.Autorest/test/AzExaInfra.Tests.ps1 | 49 + .../test/AzVmCluster.Recording.json | 1496 + .../test/AzVmCluster.Tests.ps1 | 81 + .../Get-AzOracleAutonomousDatabase.Tests.ps1 | 33 + ...AzOracleAutonomousDatabaseBackup.Tests.ps1 | 33 + ...onomousDatabaseCharacterSet.Recording.json | 47 + ...leAutonomousDatabaseCharacterSet.Tests.ps1 | 24 + ...atabaseNationalCharacterSet.Recording.json | 47 + ...mousDatabaseNationalCharacterSet.Tests.ps1 | 24 + ...leAutonomousDatabaseVersion.Recording.json | 47 + ...zOracleAutonomousDatabaseVersion.Tests.ps1 | 24 + ...OracleCloudExadataInfrastructure.Tests.ps1 | 33 + .../test/Get-AzOracleCloudVMCluster.Tests.ps1 | 33 + .../test/Get-AzOracleDbNode.Tests.ps1 | 33 + .../test/Get-AzOracleDbServer.Tests.ps1 | 33 + .../Get-AzOracleDbSystemShape.Recording.json | 47 + .../test/Get-AzOracleDbSystemShape.Tests.ps1 | 24 + .../Get-AzOracleDnsPrivateView.Recording.json | 47 + .../test/Get-AzOracleDnsPrivateView.Tests.ps1 | 24 + .../Get-AzOracleDnsPrivateZone.Recording.json | 47 + .../test/Get-AzOracleDnsPrivateZone.Tests.ps1 | 24 + .../test/Get-AzOracleGiVersion.Recording.json | 47 + .../test/Get-AzOracleGiVersion.Tests.ps1 | 24 + .../Invoke-AzOracleActionDbNode.Tests.ps1 | 37 + ...witchoverAutonomousDatabase.Recording.json | 914 + ...acleSwitchoverAutonomousDatabase.Tests.ps1 | 23 + .../New-AzOracleAutonomousDatabase.Tests.ps1 | 33 + ...AzOracleAutonomousDatabaseBackup.Tests.ps1 | 29 + ...OracleCloudExadataInfrastructure.Tests.ps1 | 29 + .../test/New-AzOracleCloudVMCluster.Tests.ps1 | 29 + ...ew-AzOracleCustomerContactObject.Tests.ps1 | 23 + .../test/New-AzOracleNsgCidrObject.Tests.ps1 | 23 + src/Oracle/Oracle.Autorest/test/README.md | 17 + ...emove-AzOracleAutonomousDatabase.Tests.ps1 | 25 + ...AzOracleAutonomousDatabaseBackup.Tests.ps1 | 29 + ...OracleCloudExadataInfrastructure.Tests.ps1 | 25 + .../Remove-AzOracleCloudVMCluster.Tests.ps1 | 25 + ...ve-AzOracleCloudVMClusterVM.Recording.json | 89 + .../Remove-AzOracleCloudVMClusterVM.Tests.ps1 | 27 + ...-AzOracleAutonomousDatabase.Recording.json | 44 + ...store-AzOracleAutonomousDatabase.Tests.ps1 | 24 + ...pdate-AzOracleAutonomousDatabase.Tests.ps1 | 33 + ...OracleCloudExadataInfrastructure.Tests.ps1 | 33 + .../Update-AzOracleCloudVMCluster.Tests.ps1 | 33 + src/Oracle/Oracle.Autorest/test/env.json | 39 + src/Oracle/Oracle.Autorest/test/loadEnv.ps1 | 29 + src/Oracle/Oracle.Autorest/test/utils.ps1 | 164 + .../utils/Get-SubscriptionIdTestSafe.ps1 | 7 + .../utils/Unprotect-SecureString.ps1 | 16 + src/Oracle/Oracle.sln | 74 + src/Oracle/Oracle/Az.Oracle.psd1 | 154 + src/Oracle/Oracle/ChangeLog.md | 24 + src/Oracle/Oracle/Oracle.csproj | 28 + src/Oracle/Oracle/Properties/AssemblyInfo.cs | 28 + .../help/Add-AzOracleCloudVMClusterVM.md | 275 + src/Oracle/Oracle/help/Az.Oracle.md | 106 + .../help/Get-AzOracleAutonomousDatabase.md | 216 + .../Get-AzOracleAutonomousDatabaseBackup.md | 202 + ...-AzOracleAutonomousDatabaseCharacterSet.md | 181 + ...eAutonomousDatabaseNationalCharacterSet.md | 181 + .../Get-AzOracleAutonomousDatabaseVersion.md | 183 + .../Get-AzOracleCloudExadataInfrastructure.md | 203 + .../Oracle/help/Get-AzOracleCloudVMCluster.md | 201 + src/Oracle/Oracle/help/Get-AzOracleDbNode.md | 198 + .../Oracle/help/Get-AzOracleDbServer.md | 200 + .../Oracle/help/Get-AzOracleDbSystemShape.md | 207 + .../Oracle/help/Get-AzOracleDnsPrivateView.md | 182 + .../Oracle/help/Get-AzOracleDnsPrivateZone.md | 182 + .../Oracle/help/Get-AzOracleGiVersion.md | 181 + .../help/Invoke-AzOracleActionDbNode.md | 402 + ...ke-AzOracleSwitchoverAutonomousDatabase.md | 270 + .../help/New-AzOracleAutonomousDatabase.md | 810 + .../New-AzOracleAutonomousDatabaseBackup.md | 278 + .../New-AzOracleCloudExadataInfrastructure.md | 546 + .../Oracle/help/New-AzOracleCloudVMCluster.md | 781 + .../help/New-AzOracleCustomerContactObject.md | 75 + .../Oracle/help/New-AzOracleNsgCidrObject.md | 107 + .../help/Remove-AzOracleAutonomousDatabase.md | 231 + ...Remove-AzOracleAutonomousDatabaseBackup.md | 262 + ...move-AzOracleCloudExadataInfrastructure.md | 231 + .../help/Remove-AzOracleCloudVMCluster.md | 231 + .../help/Remove-AzOracleCloudVMClusterVM.md | 307 + .../Restore-AzOracleAutonomousDatabase.md | 302 + .../help/Update-AzOracleAutonomousDatabase.md | 773 + ...date-AzOracleCloudExadataInfrastructure.md | 581 + .../help/Update-AzOracleCloudVMCluster.md | 549 + tools/CreateMappings_rules.json | 4 + 922 files changed, 254995 insertions(+) create mode 100644 src/Oracle/Oracle.Autorest/Az.Oracle.csproj create mode 100644 src/Oracle/Oracle.Autorest/Az.Oracle.format.ps1xml create mode 100644 src/Oracle/Oracle.Autorest/Az.Oracle.psd1 create mode 100644 src/Oracle/Oracle.Autorest/Az.Oracle.psm1 create mode 100644 src/Oracle/Oracle.Autorest/README.md create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases-autonomousDatabaseBackups.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures-dbServers.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters-dbNodes.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseCharacterSets.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseNationalCharacterSets.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDbVersions.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dbSystemShapes.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateViews.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateZones.json create mode 100644 src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-giVersions.json create mode 100644 src/Oracle/Oracle.Autorest/build-module.ps1 create mode 100644 src/Oracle/Oracle.Autorest/check-dependencies.ps1 create mode 100644 src/Oracle/Oracle.Autorest/create-model-cmdlets.ps1 create mode 100644 src/Oracle/Oracle.Autorest/custom/Az.Oracle.custom.psm1 create mode 100644 src/Oracle/Oracle.Autorest/custom/README.md create mode 100644 src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleCustomerContactObject.ps1 create mode 100644 src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleNsgCidrObject.ps1 create mode 100644 src/Oracle/Oracle.Autorest/examples/Add-AzOracleCloudVMClusterVM.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseCharacterSet.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseVersion.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbNode.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbServer.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbSystemShape.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateView.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateZone.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Get-AzOracleGiVersion.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleActionDbNode.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleSwitchoverAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/examples/New-AzOracleCustomerContactObject.md create mode 100644 src/Oracle/Oracle.Autorest/examples/New-AzOracleNsgCidrObject.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMClusterVM.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Restore-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Update-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/export-surface.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Add-AzOracleCloudVMClusterVM.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabase.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseBackup.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseCharacterSet.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseNationalCharacterSet.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseVersion.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudExadataInfrastructure.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudVMCluster.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbNode.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbServer.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbSystemShape.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateView.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateZone.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Get-AzOracleGiVersion.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleActionDbNode.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleSwitchoverAutonomousDatabase.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabase.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabaseBackup.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudExadataInfrastructure.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudVMCluster.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/New-AzOracleCustomerContactObject.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/New-AzOracleNsgCidrObject.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/ProxyCmdletDefinitions.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/README.md create mode 100644 src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabase.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabaseBackup.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudExadataInfrastructure.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMCluster.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMClusterVM.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Restore-AzOracleAutonomousDatabase.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Update-AzOracleAutonomousDatabase.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudExadataInfrastructure.ps1 create mode 100644 src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudVMCluster.ps1 create mode 100644 src/Oracle/Oracle.Autorest/generate-help.ps1 create mode 100644 src/Oracle/Oracle.Autorest/generate-portal-ux.ps1 create mode 100644 src/Oracle/Oracle.Autorest/generated/Module.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Any.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Any.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Any.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Any.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.dictionary.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.dictionary.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.dictionary.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Month.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Month.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Month.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Month.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Operation.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Operation.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Operation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Operation.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Plan.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Plan.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Plan.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Plan.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Resource.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Resource.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Resource.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/Resource.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.PowerShell.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.TypeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.json.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/api/Oracle.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentityLocation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List1.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List1.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List1.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentityCloudVMCluster.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentityCloudExadataInfrastructure.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentityLocation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentityLocation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentityLocation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_Get.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentityLocation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleOperation_List.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_Delete.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_Delete.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_DeleteViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_Delete.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_Remove.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_Delete.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_DeleteViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_Restore.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentity.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/AsyncCommandRuntime.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/AsyncJob.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/AsyncOperationResponse.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsAttributes.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsHelpers.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/StringExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/XmlExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/CmdInfoHandler.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Context.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/ConversionException.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/IJsonConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Conversions/StringLikeConverter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/IJsonSerializable.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonArray.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonBoolean.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNode.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNumber.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonObject.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Customizations/XNodeArray.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Debugging.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/DictionaryExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/EventData.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/EventDataExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/EventListener.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Events.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/EventsExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Extensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Seperator.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Helpers/TypeDetails.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Helpers/XHelper.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/HttpPipeline.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/HttpPipelineMocking.ps1 create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/IAssociativeArray.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/IHeaderSerializable.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/ISendAsync.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/InfoAttribute.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/InputHandler.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Iso/IsoDate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/JsonType.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/MessageAttribute.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/MessageAttributeHelper.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Method.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonMember.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModel.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModelCache.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XList.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XSet.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonBoolean.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonDate.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNode.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNumber.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonObject.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonString.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XBinary.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XNull.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonParser.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonToken.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonTokenizer.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Parser/Location.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Parser/Readers/SourceReader.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Parser/TokenReader.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/PipelineMocking.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.Designer.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.resx create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Response.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Serialization/JsonSerializer.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Serialization/PropertyTransformation.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Serialization/SerializationOptions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/SerializationMode.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/TypeConverterExtensions.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/UndeclaredResponseException.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/Writers/JsonWriter.cs create mode 100644 src/Oracle/Oracle.Autorest/generated/runtime/delegates.cs create mode 100644 src/Oracle/Oracle.Autorest/help/Add-AzOracleCloudVMClusterVM.md create mode 100644 src/Oracle/Oracle.Autorest/help/Az.Oracle.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseCharacterSet.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseVersion.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleDbNode.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleDbServer.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleDbSystemShape.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateView.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateZone.md create mode 100644 src/Oracle/Oracle.Autorest/help/Get-AzOracleGiVersion.md create mode 100644 src/Oracle/Oracle.Autorest/help/Invoke-AzOracleActionDbNode.md create mode 100644 src/Oracle/Oracle.Autorest/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle.Autorest/help/New-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/help/New-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/help/New-AzOracleCustomerContactObject.md create mode 100644 src/Oracle/Oracle.Autorest/help/New-AzOracleNsgCidrObject.md create mode 100644 src/Oracle/Oracle.Autorest/help/README.md create mode 100644 src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMClusterVM.md create mode 100644 src/Oracle/Oracle.Autorest/help/Restore-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/help/Update-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle.Autorest/how-to.md create mode 100644 src/Oracle/Oracle.Autorest/internal/Az.Oracle.internal.psm1 create mode 100644 src/Oracle/Oracle.Autorest/internal/Get-AzOracleOperation.ps1 create mode 100644 src/Oracle/Oracle.Autorest/internal/ProxyCmdletDefinitions.ps1 create mode 100644 src/Oracle/Oracle.Autorest/internal/README.md create mode 100644 src/Oracle/Oracle.Autorest/pack-module.ps1 create mode 100644 src/Oracle/Oracle.Autorest/run-module.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test-module.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/AzAdbs.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/AzAdbs.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/AzExaInfra.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/AzExaInfra.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/AzVmCluster.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/AzVmCluster.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabase.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseBackup.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudExadataInfrastructure.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudVMCluster.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDbNode.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDbServer.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Invoke-AzOracleActionDbNode.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabase.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabaseBackup.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/New-AzOracleCloudExadataInfrastructure.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/New-AzOracleCloudVMCluster.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/New-AzOracleCustomerContactObject.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/New-AzOracleNsgCidrObject.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/README.md create mode 100644 src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabase.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabaseBackup.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudExadataInfrastructure.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMCluster.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Recording.json create mode 100644 src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Update-AzOracleAutonomousDatabase.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudExadataInfrastructure.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudVMCluster.Tests.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/env.json create mode 100644 src/Oracle/Oracle.Autorest/test/loadEnv.ps1 create mode 100644 src/Oracle/Oracle.Autorest/test/utils.ps1 create mode 100644 src/Oracle/Oracle.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 create mode 100644 src/Oracle/Oracle.Autorest/utils/Unprotect-SecureString.ps1 create mode 100644 src/Oracle/Oracle.sln create mode 100644 src/Oracle/Oracle/Az.Oracle.psd1 create mode 100644 src/Oracle/Oracle/ChangeLog.md create mode 100644 src/Oracle/Oracle/Oracle.csproj create mode 100644 src/Oracle/Oracle/Properties/AssemblyInfo.cs create mode 100644 src/Oracle/Oracle/help/Add-AzOracleCloudVMClusterVM.md create mode 100644 src/Oracle/Oracle/help/Az.Oracle.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseCharacterSet.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseVersion.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleDbNode.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleDbServer.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleDbSystemShape.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleDnsPrivateView.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleDnsPrivateZone.md create mode 100644 src/Oracle/Oracle/help/Get-AzOracleGiVersion.md create mode 100644 src/Oracle/Oracle/help/Invoke-AzOracleActionDbNode.md create mode 100644 src/Oracle/Oracle/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md create mode 100644 src/Oracle/Oracle/help/New-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle/help/New-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle/help/New-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle/help/New-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle/help/New-AzOracleCustomerContactObject.md create mode 100644 src/Oracle/Oracle/help/New-AzOracleNsgCidrObject.md create mode 100644 src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabaseBackup.md create mode 100644 src/Oracle/Oracle/help/Remove-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle/help/Remove-AzOracleCloudVMCluster.md create mode 100644 src/Oracle/Oracle/help/Remove-AzOracleCloudVMClusterVM.md create mode 100644 src/Oracle/Oracle/help/Restore-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle/help/Update-AzOracleAutonomousDatabase.md create mode 100644 src/Oracle/Oracle/help/Update-AzOracleCloudExadataInfrastructure.md create mode 100644 src/Oracle/Oracle/help/Update-AzOracleCloudVMCluster.md diff --git a/src/Oracle/Oracle.Autorest/Az.Oracle.csproj b/src/Oracle/Oracle.Autorest/Az.Oracle.csproj new file mode 100644 index 000000000000..7cd7b6249064 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/Az.Oracle.csproj @@ -0,0 +1,10 @@ + + + Oracle + Oracle + Oracle.Autorest + + + + + diff --git a/src/Oracle/Oracle.Autorest/Az.Oracle.format.ps1xml b/src/Oracle/Oracle.Autorest/Az.Oracle.format.ps1xml new file mode 100644 index 000000000000..d1ca6766ce3e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/Az.Oracle.format.ps1xml @@ -0,0 +1,6367 @@ + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ActivationLinks + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ActivationLinks#Multiple + + + + + + + + + + + + + + + ExistingCloudAccountActivationLink + + + NewCloudAccountActivationLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringType + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringType#Multiple + + + + + + + + + + + + + + + + + + High + + + Low + + + Medium + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsType + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsType#Multiple + + + + + + + + + + + + + + + ApexVersion + + + OrdsVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AutonomousDatabaseOcid + + + BackupType + + + DatabaseSizeInTb + + + DbVersion + + + DisplayName + + + IsAutomatic + + + IsRestorable + + + LifecycleDetail + + + LifecycleState + + + Ocid + + + ProvisioningState + + + RetentionPeriodInDay + + + SizeInTb + + + TimeAvailableTil + + + TimeEnded + + + TimeStarted + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupUpdateProperties#Multiple + + + + + + + + + + + + RetentionPeriodInDay + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllocatedStorageSizeInTb + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisioningState + + + Role + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSet + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSet#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetProperties#Multiple + + + + + + + + + + + + CharacterSet + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCloneProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCloneProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllConnectionStringHigh + + + AllConnectionStringLow + + + AllConnectionStringMedium + + + AllocatedStorageSizeInTb + + + ApexDetailApexVersion + + + ApexDetailOrdsVersion + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + ConnectionStringDedicated + + + ConnectionStringHigh + + + ConnectionStringLow + + + ConnectionStringMedium + + + ConnectionUrlApexUrl + + + ConnectionUrlDatabaseTransformsUrl + + + ConnectionUrlGraphStudioUrl + + + ConnectionUrlMachineLearningNotebookUrl + + + ConnectionUrlMongoDbUrl + + + ConnectionUrlOrdsUrl + + + ConnectionUrlSqlDevWebUrl + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DayOfWeekName + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + LocalStandbyDbLagTimeInSecond + + + LocalStandbyDbLifecycleDetail + + + LocalStandbyDbLifecycleState + + + LocalStandbyDbTimeDataGuardRoleChanged + + + LocalStandbyDbTimeDisasterRecoveryRoleChanged + + + LongTermBackupScheduleIsDisabled + + + LongTermBackupScheduleRepeatCadence + + + LongTermBackupScheduleRetentionPeriodInDay + + + LongTermBackupScheduleTimeOfBackup + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisioningState + + + Role + + + ScheduledOperationScheduledStartTime + + + ScheduledOperationScheduledStopTime + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + CloneType + + + IsReconnectCloneEnabled + + + IsRefreshableClone + + + RefreshableModel + + + RefreshableStatus + + + Source + + + SourceId + + + TimeUntilReconnectCloneEnabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSet + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSet#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetProperties#Multiple + + + + + + + + + + + + CharacterSet + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllConnectionStringHigh + + + AllConnectionStringLow + + + AllConnectionStringMedium + + + AllocatedStorageSizeInTb + + + ApexDetailApexVersion + + + ApexDetailOrdsVersion + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + ConnectionStringDedicated + + + ConnectionStringHigh + + + ConnectionStringLow + + + ConnectionStringMedium + + + ConnectionUrlApexUrl + + + ConnectionUrlDatabaseTransformsUrl + + + ConnectionUrlGraphStudioUrl + + + ConnectionUrlMachineLearningNotebookUrl + + + ConnectionUrlMongoDbUrl + + + ConnectionUrlOrdsUrl + + + ConnectionUrlSqlDevWebUrl + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DayOfWeekName + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + LocalStandbyDbLagTimeInSecond + + + LocalStandbyDbLifecycleDetail + + + LocalStandbyDbLifecycleState + + + LocalStandbyDbTimeDataGuardRoleChanged + + + LocalStandbyDbTimeDisasterRecoveryRoleChanged + + + LongTermBackupScheduleIsDisabled + + + LongTermBackupScheduleRepeatCadence + + + LongTermBackupScheduleRetentionPeriodInDay + + + LongTermBackupScheduleTimeOfBackup + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisioningState + + + Role + + + ScheduledOperationScheduledStartTime + + + ScheduledOperationScheduledStopTime + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummary + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummary#Multiple + + + + + + + + + + + + + + + + + + + + + + + + LagTimeInSecond + + + LifecycleDetail + + + LifecycleState + + + TimeDataGuardRoleChanged + + + TimeDisasterRecoveryRoleChanged + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AutonomousMaintenanceScheduleType + + + BackupRetentionPeriodInDay + + + ComputeCount + + + CpuCoreCount + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DisplayName + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + LicenseModel + + + LocalAdgAutoFailoverMaxDataLossLimit + + + OpenMode + + + PeerDbId + + + PermissionLevel + + + Role + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateTags#Multiple + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseWalletFile + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseWalletFile#Multiple + + + + + + + + + + + + WalletFile + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersion + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersion#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + DbWorkload + + + IsDefaultForFree + + + IsDefaultForPaid + + + IsFreeTierEnabled + + + IsPaidEnabled + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudAccountDetails + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudAccountDetails#Multiple + + + + + + + + + + + + + + + CloudAccountHomeRegion + + + CloudAccountName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActivatedStorageCount + + + AdditionalStorageCount + + + AvailableStorageSizeInGb + + + ComputeCount + + + CpuCount + + + DataStorageSizeInTb + + + DbNodeStorageSizeInGb + + + DbServerVersion + + + DisplayName + + + LastMaintenanceRunId + + + LifecycleDetail + + + LifecycleState + + + MaxCpuCount + + + MaxDataStorageInTb + + + MaxDbNodeStorageSizeInGb + + + MaxMemoryInGb + + + MemorySizeInGb + + + MonthlyDbServerVersion + + + MonthlyStorageServerVersion + + + NextMaintenanceRunId + + + OciUrl + + + Ocid + + + ProvisioningState + + + Shape + + + StorageCount + + + StorageServerVersion + + + TimeCreated + + + TotalStorageSizeInGb + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateProperties#Multiple + + + + + + + + + + + + + + + + + + ComputeCount + + + DisplayName + + + StorageCount + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateTags#Multiple + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BackupSubnetCidr + + + CloudExadataInfrastructureId + + + ClusterName + + + CompartmentId + + + CpuCoreCount + + + DataStoragePercentage + + + DataStorageSizeInTb + + + DbNodeStorageSizeInGb + + + DiskRedundancy + + + DisplayName + + + Domain + + + GiVersion + + + Hostname + + + IsLocalBackupEnabled + + + IsSparseDiskgroupEnabled + + + LastUpdateHistoryEntryId + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + ListenerPort + + + MemorySizeInGb + + + NodeCount + + + NsgUrl + + + OciUrl + + + Ocid + + + OcpuCount + + + ProvisioningState + + + ScanDnsName + + + ScanDnsRecordId + + + ScanListenerPortTcp + + + ScanListenerPortTcpSsl + + + Shape + + + StorageSizeInGb + + + SubnetId + + + SubnetOcid + + + SystemVersion + + + TimeCreated + + + TimeZone + + + VnetId + + + ZoneId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CpuCoreCount + + + DataStorageSizeInTb + + + DbNodeStorageSizeInGb + + + DisplayName + + + LicenseModel + + + MemorySizeInGb + + + OcpuCount + + + StorageSizeInGb + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateTags#Multiple + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringType + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringType#Multiple + + + + + + + + + + + + + + + + + + + + + Dedicated + + + High + + + Low + + + Medium + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlType + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlType#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ApexUrl + + + DatabaseTransformsUrl + + + GraphStudioUrl + + + MachineLearningNotebookUrl + + + MongoDbUrl + + + OrdsUrl + + + SqlDevWebUrl + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact#Multiple + + + + + + + + + + + + Email + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions#Multiple + + + + + + + + + + + + + + + + + + IsDiagnosticsEventsEnabled + + + IsHealthMonitoringEnabled + + + IsIncidentLogsEnabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeek + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeek#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdate + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdate#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfig + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfig#Multiple + + + + + + + + + + + + + + + + + + DbName + + + FlashCacheLimit + + + Share + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNode + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNode#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeAction + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeAction#Multiple + + + + + + + + + + + + Action + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AdditionalDetail + + + BackupIPId + + + BackupVnic2Id + + + BackupVnicId + + + CpuCoreCount + + + DbNodeStorageSizeInGb + + + DbServerId + + + DbSystemId + + + FaultDomain + + + HostIPId + + + Hostname + + + LifecycleDetail + + + LifecycleState + + + MaintenanceType + + + MemorySizeInGb + + + Ocid + + + ProvisioningState + + + SoftwareStorageSizeInGb + + + TimeCreated + + + TimeMaintenanceWindowEnd + + + TimeMaintenanceWindowStart + + + Vnic2Id + + + VnicId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServer + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServer#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetails + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetails#Multiple + + + + + + + + + + + + + + + + + + + + + EstimatedPatchDuration + + + PatchingStatus + + + TimePatchingEnded + + + TimePatchingStarted + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CompartmentId + + + CpuCoreCount + + + DbNodeStorageSizeInGb + + + DisplayName + + + ExadataInfrastructureId + + + LifecycleDetail + + + LifecycleState + + + MaxCpuCount + + + MaxDbNodeStorageInGb + + + MaxMemoryInGb + + + MemorySizeInGb + + + Ocid + + + ProvisioningState + + + Shape + + + TimeCreated + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShape + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShape#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AvailableCoreCount + + + AvailableCoreCountPerNode + + + AvailableDataStorageInTb + + + AvailableDataStoragePerServerInTb + + + AvailableDbNodePerNodeInGb + + + AvailableDbNodeStorageInGb + + + AvailableMemoryInGb + + + AvailableMemoryPerNodeInGb + + + CoreCountIncrement + + + MaxStorageCount + + + MaximumNodeCount + + + MinCoreCountPerNode + + + MinDataStorageInTb + + + MinDbNodeStoragePerNodeInGb + + + MinMemoryPerNodeInGb + + + MinStorageCount + + + MinimumCoreCount + + + MinimumNodeCount + + + RuntimeMinimumCoreCount + + + ShapeFamily + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateView + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateView#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DisplayName + + + IsProtected + + + LifecycleState + + + Ocid + + + ProvisioningState + + + Self + + + TimeCreated + + + TimeUpdated + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZone + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZone#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IsProtected + + + LifecycleState + + + Ocid + + + ProvisioningState + + + Self + + + Serial + + + TimeCreated + + + Version + + + ViewId + + + ZoneType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetail#Multiple + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTime + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTime#Multiple + + + + + + + + + + + + + + + + + + + + + EstimatedDbServerPatchingTime + + + EstimatedNetworkSwitchesPatchingTime + + + EstimatedStorageServerPatchingTime + + + TotalEstimatedPatchingTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfig + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfig#Multiple + + + + + + + + + + + + + + + + + + LifecycleDetail + + + LifecycleState + + + Objective + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GenerateAutonomousDatabaseWalletDetails + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GenerateAutonomousDatabaseWalletDetails#Multiple + + + + + + + + + + + + + + + GenerateType + + + IsRegional + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersion + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersion#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionProperties#Multiple + + + + + + + + + + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails#Multiple + + + + + + + + + + + + + + + + + + + + + IsDisabled + + + RepeatCadence + + + RetentionPeriodInDay + + + TimeOfBackup + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + CustomActionTimeoutInMin + + + IsCustomActionTimeoutEnabled + + + IsMonthlyPatchingEnabled + + + LeadTimeInWeek + + + PatchingMode + + + Preference + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Month + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Month#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr#Multiple + + + + + + + + + + + + Source + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Operation + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Operation#Multiple + + + + + + + + + + + + + + + + + + + + + ActionType + + + IsDataAction + + + Name + + + Origin + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationDisplay + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationDisplay#Multiple + + + + + + + + + + + + + + + + + + + + + Description + + + Operation + + + Provider + + + Resource + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleIdentity + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleIdentity#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adbbackupid + + + Adbscharsetname + + + Adbsncharsetname + + + Autonomousdatabasename + + + Autonomousdbversionsname + + + Cloudexadatainfrastructurename + + + Cloudvmclustername + + + Dbnodeocid + + + Dbserverocid + + + Dbsystemshapename + + + Dnsprivateviewocid + + + Dnsprivatezonename + + + Giversionname + + + Location + + + ResourceGroupName + + + SubscriptionId + + + Systemversionname + + + Virtualnetworkaddressname + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CloudAccountId + + + CloudAccountState + + + Intent + + + ProductCode + + + ProvisioningState + + + SaasSubscriptionId + + + TermUnit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionUpdateProperties#Multiple + + + + + + + + + + + + + + + Intent + + + ProductCode + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PeerDbDetails + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PeerDbDetails#Multiple + + + + + + + + + + + + PeerDbId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Plan + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Plan#Multiple + + + + + + + + + + + + + + + + + + + + + + + + Name + + + Product + + + PromotionCode + + + Publisher + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanUpdate + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanUpdate#Multiple + + + + + + + + + + + + + + + + + + + + + + + + Name + + + Product + + + PromotionCode + + + Publisher + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PortRange + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PortRange#Multiple + + + + + + + + + + + + + + + Max + + + Min + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PrivateIPAddressesFilter + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PrivateIPAddressesFilter#Multiple + + + + + + + + + + + + + + + SubnetId + + + VnicId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PrivateIPAddressProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PrivateIPAddressProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + DisplayName + + + HostnameLabel + + + IPAddress + + + Ocid + + + SubnetId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileType + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileType#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ConsumerGroup + + + DisplayName + + + HostFormat + + + IsRegional + + + Protocol + + + SessionMode + + + SyntaxFormat + + + TlsAuthentication + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Resource + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Resource#Multiple + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.RestoreAutonomousDatabaseDetails + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.RestoreAutonomousDatabaseDetails#Multiple + + + + + + + + + + + + Timestamp + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SaasSubscriptionDetails + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SaasSubscriptionDetails#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IsAutoRenew + + + IsFreeTrial + + + OfferId + + + PlanId + + + PublisherId + + + PurchaserEmailId + + + PurchaserTenantId + + + ResourceGroupName + + + SaasSubscriptionStatus + + + SubscriptionName + + + TermUnit + + + TimeCreated + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsType + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsType#Multiple + + + + + + + + + + + + + + + ScheduledStartTime + + + ScheduledStopTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdate + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdate#Multiple + + + + + + + + + + + + + + + ScheduledStartTime + + + ScheduledStopTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemData#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersion + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersion#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionProperties#Multiple + + + + + + + + + + + + SystemVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionsFilter + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionsFilter#Multiple + + + + + + + + + + + + + + + + + + GiVersion + + + IsLatestVersion + + + Shape + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTags + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTags#Multiple + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationError + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationError#Multiple + + + + + + + + + + + + + + + Code + + + Message + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationResult#Multiple + + + + + + + + + + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddress + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddress#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressListResult + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressProperties + + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressProperties#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Domain + + + IPAddress + + + LifecycleDetail + + + LifecycleState + + + Ocid + + + ProvisioningState + + + TimeAssigned + + + VMOcid + + + + + + + + \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/Az.Oracle.psd1 b/src/Oracle/Oracle.Autorest/Az.Oracle.psd1 new file mode 100644 index 000000000000..0df0950861f0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/Az.Oracle.psd1 @@ -0,0 +1,23 @@ +@{ + GUID = '50196261-2b3a-4dac-808d-3a2a25b147cd' + RootModule = './Az.Oracle.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: Oracle cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.Oracle.private.dll' + FormatsToProcess = './Az.Oracle.format.ps1xml' + FunctionsToExport = 'Add-AzOracleCloudVMClusterVM', 'Get-AzOracleAutonomousDatabase', 'Get-AzOracleAutonomousDatabaseBackup', 'Get-AzOracleAutonomousDatabaseCharacterSet', 'Get-AzOracleAutonomousDatabaseNationalCharacterSet', 'Get-AzOracleAutonomousDatabaseVersion', 'Get-AzOracleCloudExadataInfrastructure', 'Get-AzOracleCloudVMCluster', 'Get-AzOracleDbNode', 'Get-AzOracleDbServer', 'Get-AzOracleDbSystemShape', 'Get-AzOracleDnsPrivateView', 'Get-AzOracleDnsPrivateZone', 'Get-AzOracleGiVersion', 'Invoke-AzOracleActionDbNode', 'Invoke-AzOracleSwitchoverAutonomousDatabase', 'New-AzOracleAutonomousDatabase', 'New-AzOracleAutonomousDatabaseBackup', 'New-AzOracleCloudExadataInfrastructure', 'New-AzOracleCloudVMCluster', 'New-AzOracleCustomerContactObject', 'New-AzOracleNsgCidrObject', 'Remove-AzOracleAutonomousDatabase', 'Remove-AzOracleAutonomousDatabaseBackup', 'Remove-AzOracleCloudExadataInfrastructure', 'Remove-AzOracleCloudVMCluster', 'Remove-AzOracleCloudVMClusterVM', 'Restore-AzOracleAutonomousDatabase', 'Update-AzOracleAutonomousDatabase', 'Update-AzOracleCloudExadataInfrastructure', 'Update-AzOracleCloudVMCluster' + PrivateData = @{ + PSData = @{ + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Oracle' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } +} diff --git a/src/Oracle/Oracle.Autorest/Az.Oracle.psm1 b/src/Oracle/Oracle.Autorest/Az.Oracle.psm1 new file mode 100644 index 000000000000..550775d073de --- /dev/null +++ b/src/Oracle/Oracle.Autorest/Az.Oracle.psm1 @@ -0,0 +1,119 @@ +# region Generated + # ---------------------------------------------------------------------------------- + # Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. + # ---------------------------------------------------------------------------------- + # Load required Az.Accounts module + $accountsName = 'Az.Accounts' + $accountsModule = Get-Module -Name $accountsName + if(-not $accountsModule) { + $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules' + if(Test-Path -Path $localAccountsPath) { + $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1 + if($localAccounts) { + $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru + } + } + if(-not $accountsModule) { + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 + if($hasAdequateVersion) { + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru + } + } + } + + if(-not $accountsModule) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + } + Write-Information "Loaded Module '$($accountsModule.Name)'" + + # Load the private module dll + $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.Oracle.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module]::Instance + + # Ask for the shared functionality table + $VTable = Register-AzModule + + # Tweaks the pipeline on module load + $instance.OnModuleLoad = $VTable.OnModuleLoad + + # Following two delegates are added for telemetry + $instance.GetTelemetryId = $VTable.GetTelemetryId + $instance.Telemetry = $VTable.Telemetry + + # Delegate to sanitize the output object + $instance.SanitizeOutput = $VTable.SanitizerHandler + + # Delegate to get the telemetry info + $instance.GetTelemetryInfo = $VTable.GetTelemetryInfo + + # Tweaks the pipeline per call + $instance.OnNewRequest = $VTable.OnNewRequest + + # Gets shared parameter values + $instance.GetParameterValue = $VTable.GetParameterValue + + # Allows shared module to listen to events from this module + $instance.EventListener = $VTable.EventListener + + # Gets shared argument completers + $instance.ArgumentCompleter = $VTable.ArgumentCompleter + + # The name of the currently selected Azure profile + $instance.ProfileName = $VTable.ProfileName + + # Load the custom module + $customModulePath = Join-Path $PSScriptRoot './custom/Az.Oracle.custom.psm1' + if(Test-Path $customModulePath) { + $null = Import-Module -Name $customModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = Join-Path $PSScriptRoot './exports' + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } + + # Finalize initialization of this module + $instance.Init(); + Write-Information "Loaded Module '$($instance.Name)'" +# endregion diff --git a/src/Oracle/Oracle.Autorest/README.md b/src/Oracle/Oracle.Autorest/README.md new file mode 100644 index 000000000000..6e3b1f44d1c0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/README.md @@ -0,0 +1,88 @@ + +# Az.Oracle +This directory contains the PowerShell module for the Oracle service. + +--- +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.Oracle`, see [how-to.md](how-to.md). + + +### AutoRest Configuration +> see https://aka.ms/autorest + +```yaml +commit: cbbe228fd422db02b65e2748f83df5f2bcad7581 +require: + - $(this-folder)/../../readme.azure.noprofile.md + - $(repo)/specification/oracle/resource-manager/readme.md + +try-require: + - $(repo)/specification/oracle/resource-manager/readme.md + +module-version: 0.1.0 +title: Oracle +subject-prefix: $(service-name) + +inlining-threshold: 100 +resourcegroup-append: true +nested-object-to-string: true +identity-correction-for-post: true + +directive: + # Model complex objects + - model-cmdlet: + - model-name: CustomerContact + - model-cmdlet: + - model-name: NsgCidr + + # Remove the set-* cmdlet + - where: + verb: Set + remove: true + + # Remove APIs + - where: + subject: CloudExadataInfrastructureStorageCapacity|PrivateIpaddress|SystemVersion|VirtualNetworkAddress|AutonomousDatabaseWallet|ShrinkAutonomousDatabase|OracleSubscription + remove: true + - where: + subject: AutonomousDatabaseBackUp + verb: Update + remove: true + + # Remove variants + - where: + variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString)) + remove: true + - where: + variant: ^CreateViaIdentity.*$ + remove: true + - where: + variant: ^Add$|^AddViaIdentity$|^Action$|^ActionViaIdentity$|^ActionViaIdentityCloudVMCluster$|^Switchover$|^SwitchoverViaIdentity$ + remove: true + + # Rename parameter + - where: + parameter-name: ScheduledOperationScheduledStartTime + set: + parameter-name: ScheduledStartTime + - where: + parameter-name: ScheduledOperationScheduledStopTime + set: + parameter-name: ScheduledStopTime +``` diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases-autonomousDatabaseBackups.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases-autonomousDatabaseBackups.json new file mode 100644 index 000000000000..6b49ae628ea9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases-autonomousDatabaseBackups.json @@ -0,0 +1,95 @@ +{ + "resourceType": "autonomousDatabases/autonomousDatabaseBackups", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleAutonomousDatabaseBackup", + "description": "Get a AutonomousDatabaseBackup", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasebackup" + }, + "parameterSets": [ + { + "parameters": [ + "-Adbbackupid ", + "-Autonomousdatabasename ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a AutonomousDatabaseBackup", + "parameters": [ + { + "name": "-Adbbackupid", + "value": "[Path.adbbackupid]" + }, + { + "name": "-Autonomousdatabasename", + "value": "[Path.autonomousdatabasename]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzOracleAutonomousDatabaseBackup", + "description": "Delete a AutonomousDatabaseBackup", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabasebackup" + }, + "parameterSets": [ + { + "parameters": [ + "-Adbbackupid ", + "-Autonomousdatabasename ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a AutonomousDatabaseBackup", + "parameters": [ + { + "name": "-Adbbackupid", + "value": "[Path.adbbackupid]" + }, + { + "name": "-Autonomousdatabasename", + "value": "[Path.autonomousdatabasename]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases.json new file mode 100644 index 000000000000..85c070f400be --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/autonomousDatabases.json @@ -0,0 +1,85 @@ +{ + "resourceType": "autonomousDatabases", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleAutonomousDatabase", + "description": "Get a AutonomousDatabase", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabase" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a AutonomousDatabase", + "parameters": [ + { + "name": "-Name", + "value": "[Path.autonomousdatabasename]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzOracleAutonomousDatabase", + "description": "Delete a AutonomousDatabase", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabase" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a AutonomousDatabase", + "parameters": [ + { + "name": "-Name", + "value": "[Path.autonomousdatabasename]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures-dbServers.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures-dbServers.json new file mode 100644 index 000000000000..7611e83f3c04 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures-dbServers.json @@ -0,0 +1,52 @@ +{ + "resourceType": "cloudExadataInfrastructures/dbServers", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleDbServer", + "description": "Get a DbServer", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbserver" + }, + "parameterSets": [ + { + "parameters": [ + "-Cloudexadatainfrastructurename ", + "-Ocid ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a DbServer", + "parameters": [ + { + "name": "-Cloudexadatainfrastructurename", + "value": "[Path.cloudexadatainfrastructurename]" + }, + { + "name": "-Ocid", + "value": "[Path.dbserverocid]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures.json new file mode 100644 index 000000000000..c8b2c9eb8833 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudExadataInfrastructures.json @@ -0,0 +1,85 @@ +{ + "resourceType": "cloudExadataInfrastructures", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleCloudExadataInfrastructure", + "description": "Get a CloudExadataInfrastructure", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudexadatainfrastructure" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a CloudExadataInfrastructure", + "parameters": [ + { + "name": "-Name", + "value": "[Path.cloudexadatainfrastructurename]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzOracleCloudExadataInfrastructure", + "description": "Delete a CloudExadataInfrastructure", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudexadatainfrastructure" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a CloudExadataInfrastructure", + "parameters": [ + { + "name": "-Name", + "value": "[Path.cloudexadatainfrastructurename]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters-dbNodes.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters-dbNodes.json new file mode 100644 index 000000000000..152bcf913220 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters-dbNodes.json @@ -0,0 +1,52 @@ +{ + "resourceType": "cloudVmClusters/dbNodes", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleDbNode", + "description": "Get a DbNode", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbnode" + }, + "parameterSets": [ + { + "parameters": [ + "-Cloudvmclustername ", + "-Ocid ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a DbNode", + "parameters": [ + { + "name": "-Cloudvmclustername", + "value": "[Path.cloudvmclustername]" + }, + { + "name": "-Ocid", + "value": "[Path.dbnodeocid]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters.json new file mode 100644 index 000000000000..479a115c46b4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/cloudVmClusters.json @@ -0,0 +1,85 @@ +{ + "resourceType": "cloudVmClusters", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleCloudVMCluster", + "description": "Get a CloudVmCluster", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudvmcluster" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a CloudVmCluster", + "parameters": [ + { + "name": "-Name", + "value": "[Path.cloudvmclustername]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + }, + { + "name": "Remove-AzOracleCloudVMCluster", + "description": "Delete a CloudVmCluster", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmcluster" + }, + "parameterSets": [ + { + "parameters": [ + "-Name ", + "-ResourceGroupName ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Delete a CloudVmCluster", + "parameters": [ + { + "name": "-Name", + "value": "[Path.cloudvmclustername]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseCharacterSets.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseCharacterSets.json new file mode 100644 index 000000000000..90bb2cefc397 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseCharacterSets.json @@ -0,0 +1,47 @@ +{ + "resourceType": "locations/autonomousDatabaseCharacterSets", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleAutonomousDatabaseCharacterSet", + "description": "Get a AutonomousDatabaseCharacterSet", + "path": "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasecharacterset" + }, + "parameterSets": [ + { + "parameters": [ + "-Adbscharsetname ", + "-Location ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a AutonomousDatabaseCharacterSet", + "parameters": [ + { + "name": "-Adbscharsetname", + "value": "[Path.adbscharsetname]" + }, + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseNationalCharacterSets.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseNationalCharacterSets.json new file mode 100644 index 000000000000..594623fe9d4d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDatabaseNationalCharacterSets.json @@ -0,0 +1,47 @@ +{ + "resourceType": "locations/autonomousDatabaseNationalCharacterSets", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleAutonomousDatabaseNationalCharacterSet", + "description": "Get a AutonomousDatabaseNationalCharacterSet", + "path": "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasenationalcharacterset" + }, + "parameterSets": [ + { + "parameters": [ + "-Adbsncharsetname ", + "-Location ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a AutonomousDatabaseNationalCharacterSet", + "parameters": [ + { + "name": "-Adbsncharsetname", + "value": "[Path.adbsncharsetname]" + }, + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDbVersions.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDbVersions.json new file mode 100644 index 000000000000..5cdb77b188df --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-autonomousDbVersions.json @@ -0,0 +1,47 @@ +{ + "resourceType": "locations/autonomousDbVersions", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleAutonomousDatabaseVersion", + "description": "Get a AutonomousDbVersion", + "path": "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabaseversion" + }, + "parameterSets": [ + { + "parameters": [ + "-Autonomousdbversionsname ", + "-Location ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a AutonomousDbVersion", + "parameters": [ + { + "name": "-Autonomousdbversionsname", + "value": "[Path.autonomousdbversionsname]" + }, + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dbSystemShapes.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dbSystemShapes.json new file mode 100644 index 000000000000..72f3ad9f7322 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dbSystemShapes.json @@ -0,0 +1,47 @@ +{ + "resourceType": "locations/dbSystemShapes", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleDbSystemShape", + "description": "Get a DbSystemShape", + "path": "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbsystemshape" + }, + "parameterSets": [ + { + "parameters": [ + "-Location ", + "-Name ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a DbSystemShape", + "parameters": [ + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-Name", + "value": "[Path.dbsystemshapename]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateViews.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateViews.json new file mode 100644 index 000000000000..36f80311c143 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateViews.json @@ -0,0 +1,47 @@ +{ + "resourceType": "locations/dnsPrivateViews", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleDnsPrivateView", + "description": "Get a DnsPrivateView", + "path": "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivateview" + }, + "parameterSets": [ + { + "parameters": [ + "-Location ", + "-Ocid ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a DnsPrivateView", + "parameters": [ + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-Ocid", + "value": "[Path.dnsprivateviewocid]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateZones.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateZones.json new file mode 100644 index 000000000000..c6589cc8f1db --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-dnsPrivateZones.json @@ -0,0 +1,47 @@ +{ + "resourceType": "locations/dnsPrivateZones", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleDnsPrivateZone", + "description": "Get a DnsPrivateZone", + "path": "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivatezone" + }, + "parameterSets": [ + { + "parameters": [ + "-Location ", + "-Name ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a DnsPrivateZone", + "parameters": [ + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-Name", + "value": "[Path.dnsprivatezonename]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-giVersions.json b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-giVersions.json new file mode 100644 index 000000000000..72c41aca3857 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/UX/Oracle.Database/locations-giVersions.json @@ -0,0 +1,47 @@ +{ + "resourceType": "locations/giVersions", + "apiVersion": "2023-09-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle" + }, + "commands": [ + { + "name": "Get-AzOracleGiVersion", + "description": "Get a GiVersion", + "path": "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclegiversion" + }, + "parameterSets": [ + { + "parameters": [ + "-Location ", + "-Name ", + "[-SubscriptionId ]" + ] + } + ] + }, + "examples": [ + { + "description": "Get a GiVersion", + "parameters": [ + { + "name": "-Location", + "value": "[Path.location]" + }, + { + "name": "-Name", + "value": "[Path.giversionname]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + } + ] + } + ] + } + ] +} diff --git a/src/Oracle/Oracle.Autorest/build-module.ps1 b/src/Oracle/Oracle.Autorest/build-module.ps1 new file mode 100644 index 000000000000..66d0fa3c51de --- /dev/null +++ b/src/Oracle/Oracle.Autorest/build-module.ps1 @@ -0,0 +1,190 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks) +$ErrorActionPreference = 'Stop' + +if($PSEdition -ne 'Core') { + Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.' +} + +if(-not $NotIsolated -and -not $Debugger) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + + if($LastExitCode -ne 0) { + # Build failed. Don't attempt to run the module. + return + } + + if($Test) { + . (Join-Path $PSScriptRoot 'test-module.ps1') + if($LastExitCode -ne 0) { + # Tests failed. Don't attempt to run the module. + return + } + } + + if($Docs) { + . (Join-Path $PSScriptRoot 'generate-help.ps1') + if($LastExitCode -ne 0) { + # Docs generation failed. Don't attempt to run the module. + return + } + } + + if($UX) { + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') + if($LastExitCode -ne 0) { + # UX generation failed. Don't attempt to run the module. + return + } + } + + if($Pack) { + . (Join-Path $PSScriptRoot 'pack-module.ps1') + if($LastExitCode -ne 0) { + # Packing failed. Don't attempt to run the module. + return + } + } + + $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1' + if($Code) { + . $runModulePath -Code + } elseif($Run) { + . $runModulePath + } else { + Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script." + } + return +} + +$binFolder = Join-Path $PSScriptRoot 'bin' +$objFolder = Join-Path $PSScriptRoot 'obj' + +if(-not $Debugger) { + Write-Host -ForegroundColor Green 'Cleaning build folders...' + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder + + if((Test-Path $binFolder) -or (Test-Path $objFolder)) { + Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?' + Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.' + } + + Write-Host -ForegroundColor Green 'Compiling module...' + $buildConfig = 'Debug' + if($Release) { + $buildConfig = 'Release' + } + dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo + if($LastExitCode -ne 0) { + Write-Error 'Compilation failed.' + } + + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release') +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.Oracle.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} + +# Load DLL to use build-time cmdlets +$null = Import-Module -Name $dll + +$modulePaths = $dll +$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.Oracle.custom.psm1' +if(Test-Path $customPsm1) { + $modulePaths = @($dll, $customPsm1) +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(Test-Path $exportsFolder) { + $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $exportsFolder + +$internalFolder = Join-Path $PSScriptRoot 'internal' +if(Test-Path $internalFolder) { + $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $internalFolder + +$psd1 = Join-Path $PSScriptRoot './Az.Oracle.psd1' +$guid = Get-ModuleGuid -Psd1Path $psd1 +$moduleName = 'Az.Oracle' +$examplesFolder = Join-Path $PSScriptRoot 'examples' +$null = New-Item -ItemType Directory -Force -Path $examplesFolder + +Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' +$modelCmdlets = @(@{modelName="CustomerContact"; cmdletName=""}, @{modelName="NsgCidr"; cmdletName=""}) +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} +if ($modelCmdlets.Count -gt 0) { + . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') + CreateModelCmdlet($modelCmdlets) +} + +if($NoDocs) { + Write-Host -ForegroundColor Green 'Creating exports...' + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder +} else { + Write-Host -ForegroundColor Green 'Creating exports and docs...' + $moduleDescription = 'Microsoft Azure PowerShell: Oracle cmdlets' + $docsFolder = Join-Path $PSScriptRoot 'docs' + if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue + } + $null = New-Item -ItemType Directory -Force -Path $docsFolder + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo +} + +Write-Host -ForegroundColor Green 'Creating format.ps1xml...' +$formatPs1xml = Join-Path $PSScriptRoot './Az.Oracle.format.ps1xml' +Export-FormatPs1xml -FilePath $formatPs1xml + +Write-Host -ForegroundColor Green 'Creating psd1...' +$customFolder = Join-Path $PSScriptRoot 'custom' +Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid + +Write-Host -ForegroundColor Green 'Creating test stubs...' +$testFolder = Join-Path $PSScriptRoot 'test' +$null = New-Item -ItemType Directory -Force -Path $testFolder +Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder + +Write-Host -ForegroundColor Green 'Creating example stubs...' +Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder + +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + +if (-not $DisableAfterBuildTasks){ + $afterBuildTasksPath = Join-Path $PSScriptRoot '' + $afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable + if(Test-Path -Path $afterBuildTasksPath -PathType leaf){ + Write-Host -ForegroundColor Green 'Running after build tasks...' + . $afterBuildTasksPath @afterBuildTasksArgs + } +} + + +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/Oracle/Oracle.Autorest/check-dependencies.ps1 b/src/Oracle/Oracle.Autorest/check-dependencies.ps1 new file mode 100644 index 000000000000..90ca9867ae40 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/check-dependencies.ps1 @@ -0,0 +1,65 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { + if($predicate) { + $module = Get-Module -ListAvailable -Name $moduleName + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { + $null = New-Item -ItemType Directory -Force -Path $path + Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." + if ($requiredVersion) { + Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path + }elseif($versionMinimum) { + Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path + } else { + Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path + } + } + } +} + +$ProgressPreference = 'SilentlyContinue' +$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1 + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' +DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' + +$tools = Join-Path $PSScriptRoot 'tools' +$resourceDir = Join-Path $tools 'Resources' +$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1' + +if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) { + Write-Host -ForegroundColor Green "Building local Resource module used for test..." + Set-Location $resourceDir + $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources + $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/ + Set-Location $HOME/.PSSharedModules/Resources + $null = .\build-module.ps1 + Set-Location $PSScriptRoot +} diff --git a/src/Oracle/Oracle.Autorest/create-model-cmdlets.ps1 b/src/Oracle/Oracle.Autorest/create-model-cmdlets.ps1 new file mode 100644 index 000000000000..ab449bfacd71 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/create-model-cmdlets.ps1 @@ -0,0 +1,262 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +function CreateModelCmdlet { + + param([Hashtable[]]$Models) + + if ($Models.Count -eq 0) + { + return + } + + $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' + $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' + $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.Oracle' + } + $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs + $Content = '' + $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) + { $Content += get-content $_.fullname -raw + } } + + $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) + $Nodes = $Tree.ChildNodes().ChildNodes() + $classConstantMember = @{} + foreach ($Model in $Models) + { + $ModelName = $Model.modelName + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$ModelName") } + $ClassNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'class') -and ($_.Identifier.value -eq "$ModelName") } + $classConstantMember = @() + foreach ($class in $ClassNode) { + foreach ($member in $class.Members) { + $isConstant = $false + foreach ($attr in $member.AttributeLists) { + $memberName = $attr.Attributes.Name.ToString() + if ($memberName.EndsWith('.Constant')) { + $isConstant = $true + break + } + } + if (($member.Modifiers.ToString() -eq 'public') -and $isConstant) { + $classConstantMember += $member.Identifier.Value + } + } + } + if ($InterfaceNode.count -eq 0) { + continue + } + # through a queue, we iterate all the parent models. + $Queue = @($InterfaceNode) + $visited = @("I$ModelName") + $AllInterfaceNodes = @() + while ($Queue.count -ne 0) + { + $AllInterfaceNodes += $Queue[0] + # Baselist contains the direct parent models. + foreach ($parent in $Queue[0].BaseList.Types) + { + if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value))) + { + $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) }) + $visited = [Array]$visited + $parent.Type.Right.Identifier.Value + } + } + $first, $Queue = $Queue + } + + $Namespace = $InterfaceNode.Parent.Name + $ObjectType = $ModelName + $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" + # remove duplicated module name + if ($ObjectType.StartsWith('Oracle')) { + $ModulePrefix = '' + } else { + $ModulePrefix = 'Oracle' + } + $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir + + $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string] + $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string] + foreach ($Node in $AllInterfaceNodes) + { + foreach ($Member in $Node.Members) + { + if ($classConstantMember.Contains($Member.Identifier.Value)) { + # skip constant member + continue + } + $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments + $Required = $false + $Description = "" + $Readonly = $False + $mutability = @{Read = $true; Create = $true; Update = $true} + foreach ($Argument in $Arguments) + { + if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") + { + $Required = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Description") + { + $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"') + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly") + { + $Readonly = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Read") + { + $mutability.Read = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Create") + { + $mutability.Create = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Update") + { + $mutability.Update = $Argument.Expression.Token.Value + } + } + if ($Readonly) + { + continue + } + $Identifier = $Member.Identifier.Value + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + if ($Type.StartsWith("System.Collections.Generic.List")) + { + # if the type is a list, we need to convert it to array + $matched = $Type -match '\<(?.+)\>$' + if ($matched) + { + $Type = $matches.Name + '[]'; + } + } + $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] + if ($Required -and $mutability.Create -and $mutability.Update) + { + $ParameterDefinePropertyList.Add("Mandatory") + } + if ($Description -ne "") + { + $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") + } + $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + # check whether completer is needed + $completer = ''; + if(IsEnumType($Member)){ + $completer += GetCompleter($Member) + } + $ParameterDefineScript = " + [Parameter($ParameterDefineProperty)]${completer} + [${Type}] + `$${Identifier}" + $ParameterDefineScriptList.Add($ParameterDefineScript) + $ParameterAssignScriptList.Add(" + if (`$PSBoundParameters.ContainsKey('${Identifier}')) { + `$Object.${Identifier} = `$${Identifier} + }") + } + } + $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," + $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + + $cmdletName = "New-Az${ModulePrefix}${ObjectType}Object" + if ('' -ne $Model.cmdletName) { + $cmdletName = $Model.cmdletName + } + $OutputPath = Join-Path -ChildPath "${cmdletName}.ps1" -Path $OutputDir + $cmdletNameInLowerCase = $cmdletName.ToLower() + $Script = " +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ${ObjectType}. +.Description +Create an in-memory object for ${ObjectType}. + +.Outputs +${ObjectTypeWithNamespace} +.Link +https://learn.microsoft.com/powershell/module/${ModuleName}/${cmdletNameInLowerCase} +#> +function ${cmdletName} { + [OutputType('${ObjectTypeWithNamespace}')] + [CmdletBinding(PositionalBinding=`$false)] + Param( +${ParameterDefineScript} + ) + + process { + `$Object = [${ObjectTypeWithNamespace}]::New() +${ParameterAssignScript} + return `$Object + } +} +" + Set-Content -Path $OutputPath -Value $Script + } +} + +function IsEnumType { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + $isEnum = $false + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $isEnum = $true + break + } + } + return $isEnum; +} + +function GetCompleter { + param ( + [Microsoft.CodeAnalysis.CSharp.Syntax.PropertyDeclarationSyntax]$property + ) + foreach ($attr in $property.AttributeLists) { + $attributeName = $attr.Attributes.Name.ToString() + if ($attributeName.Contains('ArgumentCompleter')) { + $attributeName = $attributeName.Split("::")[-1] + $possibleValues = [System.String]::Join(", ", $attr.Attributes.ArgumentList.Arguments) + $completer += "`n [${attributeName}(${possibleValues})]" + return $completer + } + } +} diff --git a/src/Oracle/Oracle.Autorest/custom/Az.Oracle.custom.psm1 b/src/Oracle/Oracle.Autorest/custom/Az.Oracle.custom.psm1 new file mode 100644 index 000000000000..6ab8b2ea452c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/custom/Az.Oracle.custom.psm1 @@ -0,0 +1,17 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Oracle.private.dll') + + # Load the internal module + $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Oracle.internal.psm1' + if(Test-Path $internalModulePath) { + $null = Import-Module -Name $internalModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export script cmdlets + Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias) +# endregion diff --git a/src/Oracle/Oracle.Autorest/custom/README.md b/src/Oracle/Oracle.Autorest/custom/README.md new file mode 100644 index 000000000000..841d40553a9e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.Oracle` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.Oracle.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.Oracle` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.Oracle.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.Oracle.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.Oracle`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.Oracle.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.Oracle.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.Oracle`. +- `Microsoft.Azure.PowerShell.Cmdlets.Oracle.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.Oracle`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.Oracle.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleCustomerContactObject.ps1 b/src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleCustomerContactObject.ps1 new file mode 100644 index 000000000000..8b549c37693e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleCustomerContactObject.ps1 @@ -0,0 +1,47 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for CustomerContact. +.Description +Create an in-memory object for CustomerContact. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact +.Link +https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclecustomercontactobject +#> +function New-AzOracleCustomerContactObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(Mandatory, HelpMessage="The email address used by Oracle to send notifications regarding databases and infrastructure.")] + [string] + $Email + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact]::New() + + if ($PSBoundParameters.ContainsKey('Email')) { + $Object.Email = $Email + } + return $Object + } +} + diff --git a/src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleNsgCidrObject.ps1 b/src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleNsgCidrObject.ps1 new file mode 100644 index 000000000000..57ccc9b93d2c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/custom/autogen-model-cmdlets/New-AzOracleNsgCidrObject.ps1 @@ -0,0 +1,59 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for NsgCidr. +.Description +Create an in-memory object for NsgCidr. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr +.Link +https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclensgcidrobject +#> +function New-AzOracleNsgCidrObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value.")] + [int] + $DestinationPortRangeMax, + [Parameter(HelpMessage="The minimum port number, which must not be greater than the maximum port number.")] + [int] + $DestinationPortRangeMin, + [Parameter(Mandatory, HelpMessage="Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.")] + [string] + $Source + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr]::New() + + if ($PSBoundParameters.ContainsKey('DestinationPortRangeMax')) { + $Object.DestinationPortRangeMax = $DestinationPortRangeMax + } + if ($PSBoundParameters.ContainsKey('DestinationPortRangeMin')) { + $Object.DestinationPortRangeMin = $DestinationPortRangeMin + } + if ($PSBoundParameters.ContainsKey('Source')) { + $Object.Source = $Source + } + return $Object + } +} + diff --git a/src/Oracle/Oracle.Autorest/examples/Add-AzOracleCloudVMClusterVM.md b/src/Oracle/Oracle.Autorest/examples/Add-AzOracleCloudVMClusterVM.md new file mode 100644 index 000000000000..f803780d66dc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Add-AzOracleCloudVMClusterVM.md @@ -0,0 +1,13 @@ +### Example 1: Add a VM to a Cloud VM Cluster resource +```powershell +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToAdd = @($dbServerOcid1) + +Add-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName $resourceGroup -DbServer $dbServersToAdd +``` + +Add a VM to a Cloud VM Cluster resource. +For more information, execute `Get-Help Add-AzOracleCloudVMClusterVM`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..2e1de9398c59 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabase.md @@ -0,0 +1,63 @@ +### Example 1: Get a list of the Autonomous Database resources +```powershell +Get-AzOracleAutonomousDatabase +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashbur + n-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subn + ets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:19:26 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Get an Autonomous Database resource by name and resource group name. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabase`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..f4272576637c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,17 @@ +### Example 1: Get a list of the Autonomous Database Backups for an Autonomous Database resource +```powershell +Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +Jul 06, 2024 01:54:13 UTC PowerShellTestRg +Jul 05, 2024 15:26:01 UTC PowerShellTestRg +autonomousdatabasebackup20240705141147 PowerShellTestRg +autonomousdatabasebackup20240705135809 PowerShellTestRg +Jul 04, 2024 12:00:52 UTC PowerShellTestRg +``` + +Get a list of the Autonomous Database Backups for an Autonomous Database resource. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseBackup` \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseCharacterSet.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseCharacterSet.md new file mode 100644 index 000000000000..d5dd44aadb04 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseCharacterSet.md @@ -0,0 +1,13 @@ +### Example 1: Get a list of the Autonomous Database Character Sets by location +```powershell +(Get-AzOracleAutonomousDatabaseCharacterSet -Location "eastus").CharacterSet +``` + +```output +AL32UTF8 +AR8ADOS710 +AR8ADOS720 +``` + +Get a list of the Autonomous Database Character Sets by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseCharacterSet`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md new file mode 100644 index 000000000000..5f0f95d33f11 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md @@ -0,0 +1,12 @@ +### Example 1: Get a list of the Autonomous Database National Character Sets by location +```powershell +(Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location "eastus").CharacterSet +``` + +```output +AL16UTF16 +UTF8 +``` + +Get a list of the Autonomous Database National Character Sets by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseNationalCharacterSet`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseVersion.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseVersion.md new file mode 100644 index 000000000000..f8a14b6ad7c2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleAutonomousDatabaseVersion.md @@ -0,0 +1,15 @@ +### Example 1: Get a list of the Autonomous Database Versions by location +```powershell +Get-AzOracleAutonomousDatabaseVersion -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +19c +19c +19c +``` + +Get a list of the Autonomous Database Versions by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseVersion`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..a271a645ace9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,50 @@ +### Example 1: Get a list of the Cloud Exadata Infrastructure resources +```powershell +Get-AzOracleCloudExadataInfrastructure +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +eastus OFake_PowerShellTestExaInfra 04/07/2024 13:20:00 example@oracle.com User 06/07/2024 11:04:06 857ad006-4380-4712-ba4c-22f7c64d84e7 Application PowerShellTestRg +eastus DemoExaInfra 05/07/2024 08:20:01 example@oracle.com User 06/07/2024 11:04:07 857ad006-4380-4712-ba4c-22f7c64d84e7 Application SDKTestRG +germanywestcentral OFake_ppratees_0216_2 16/02/2024 20:24:39 example@oracle.com User 06/07/2024 11:03:57 857ad006-4380-4712-ba4c-22f7c64d84e7 Application ObsTestingFra +``` + +Get a list of the Cloud Exadata Infrastructure resources. +For more information, execute `Get-Help Get-AzOracleCloudExadataInfrastructure`. + +### Example 2: Get a Cloud Exadata Infrastructure resource by name and resource group name +```powershell +Get-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +... +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbu + uk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsa + e5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 08:49:18 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Get a Cloud Exadata Infrastructure resource by name. +For more information, execute `Get-Help Get-AzOracleCloudExadataInfrastructure`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..cc83bca508f8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleCloudVMCluster.md @@ -0,0 +1,48 @@ +### Example 1: Get a list of the Cloud VM Cluster resources +```powershell +Get-AzOracleCloudVMCluster +``` + +```output +... +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-group + s/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?regio + n=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa xxx} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/sub + nets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:04:17 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +SystemVersion : +Tag : { + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Get a Cloud VM Cluster resource by name and resource group name. +For more information, execute `Get-Help Get-AzOracleCloudVMCluster`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbNode.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbNode.md new file mode 100644 index 000000000000..ca1c0b582f6d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbNode.md @@ -0,0 +1,14 @@ +### Example 1: Get a list of the Database Nodes for a Cloud VM Cluster resource +```powershell +Get-AzOracleDbNode -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa PowerShellTestRg +ocid1.dbnode.oc1.iad.anuwcljrnirvylqaqm24luvmhsaaz2wtiq3ggddpsemx6gn66vff5rulsgnq PowerShellTestRg +``` + +Get a list of the Database Nodes for a Cloud VM Cluster resource. +For more information, execute `Get-Help Get-AzOracleDbNode` \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbServer.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbServer.md new file mode 100644 index 000000000000..e38a6c1e7629 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbServer.md @@ -0,0 +1,15 @@ +### Example 1: Get a list of the Database Servers for a Cloud Exadata Infrastructure resource +```powershell +Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +dbServer-2 PowerShellTestRg +dbServer-3 PowerShellTestRg +dbServer-1 PowerShellTestRg +``` + +Get a list of the Database Servers for a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Get-AzOracleDbServer`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbSystemShape.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbSystemShape.md new file mode 100644 index 000000000000..e9a2fee0676a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDbSystemShape.md @@ -0,0 +1,40 @@ +### Example 1: Get a list of the Database System Shapes by location +```powershell +Get-AzOracleDbSystemShape -Location "eastus" +``` + +```output +AvailableCoreCount : 0 +AvailableCoreCountPerNode : 126 +AvailableDataStorageInTb : 63 +AvailableDataStoragePerServerInTb : +AvailableDbNodePerNodeInGb : 2243 +AvailableDbNodeStorageInGb : +AvailableMemoryInGb : +AvailableMemoryPerNodeInGb : 1390 +CoreCountIncrement : +Id : /subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dbSystemShapes/Exadata.X9M +MaxStorageCount : +MaximumNodeCount : 32 +MinCoreCountPerNode : 0 +MinDataStorageInTb : 2 +MinDbNodeStoragePerNodeInGb : 60 +MinMemoryPerNodeInGb : 30 +MinStorageCount : +MinimumCoreCount : 0 +MinimumNodeCount : 2 +Name : Exadata.X9M +ResourceGroupName : +RuntimeMinimumCoreCount : +ShapeFamily : EXADATA +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Oracle.Database/Locations/dbSystemShapes +``` + +Get a list of the Database System Shapes by location. +For more information, execute `Get-Help Get-AzOracleDbSystemShape`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateView.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateView.md new file mode 100644 index 000000000000..0ca1c02c4cd1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateView.md @@ -0,0 +1,15 @@ +### Example 1: Get a list of the DNS Private Views by location +```powershell +Get-AzOracleDnsPrivateView -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza +ocid1.dnsview.oc1.iad.aaaaaaaalf3jpv4bmwdg6nxw7ciudrb3smln6a46h7asgrwoironcxuoslea +ocid1.dnsview.oc1.iad.aaaaaaaags4sek6p7ocgs5sjarfm26dgmz23yegxxwqk4aowebismrbbgm6q +``` + +Get a list of the DNS Private Views by location. +For more information, execute `Get-Help Get-AzOracleDnsPrivateView`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateZone.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateZone.md new file mode 100644 index 000000000000..8d37c75d44df --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleDnsPrivateZone.md @@ -0,0 +1,15 @@ +### Example 1: Get a list of the DNS Private Zones by location +```powershell +Get-AzOracleDnsPrivateZone -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +byui3zo3.ocidelegated.ocipstestvnet.adb.us-ashburn-1.oraclevcn.com +byui3zo3.adb.us-ashburn-1.oraclevcn.com +byui3zo3.adbapps.us-ashburn-1.oraclevcn.com +``` + +Get a list of the DNS Private Zones by location. +For more information, execute `Get-Help Get-AzOracleDnsPrivateZone`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Get-AzOracleGiVersion.md b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleGiVersion.md new file mode 100644 index 000000000000..87d757361652 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Get-AzOracleGiVersion.md @@ -0,0 +1,14 @@ +### Example 1: Get a list of the Grid Infrastructure Versions by location +```powershell +Get-AzOracleGiVersion -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +19.0.0.0 +23.0.0.0 +``` + +Get a list of the Grid Infrastructure Versions by location. +For more information, execute `Get-Help Get-AzOracleGiVersion`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleActionDbNode.md b/src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleActionDbNode.md new file mode 100644 index 000000000000..67d9a3793dc2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleActionDbNode.md @@ -0,0 +1,103 @@ +### Example 1: Stop a VM in a Cloud VM Cluster resource +```powershell +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$stopActionName = "Stop" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $stopActionName +``` + +```output +AdditionalDetail : +BackupIPId : ocid1.privateIp.fake.2.1 +BackupVnic2Id : ocid1.vnic.fake.2.1 +BackupVnicId : +CpuCoreCount : 2 +DbServerId : ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq +DbSystemId : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +FaultDomain : +HostIPId : ocid1.privateIp.fake.1.1 +Hostname : host-wq5t62 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz + 22lazevdaoiye7bh4iy2nwfa +LifecycleDetail : +LifecycleState : +MaintenanceType : +MemorySizeInGb : 45 +Name : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +Ocid : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +ProvisioningState : Stopping +ResourceGroupName : PowerShellTestRg +SoftwareStorageSizeInGb : +StorageSizeInGb : 90 +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TimeCreated : 04/07/2024 16:09:39 +TimeMaintenanceWindowEnd : +TimeMaintenanceWindowStart : +Type : Oracle.Database/cloudVmClusters/dbNodes +Vnic2Id : ocid1.vnic.fake.1.1 +VnicId : +``` + +Stop a VM in a Cloud VM Cluster resource. +For more information, execute `Get-Help Invoke-AzOracleActionDbNode`. + +### Example 2: Start a VM in a Cloud VM Cluster resource +```powershell +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$startActionName = "Start" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $startActionName +``` + +```output +AdditionalDetail : +BackupIPId : ocid1.privateIp.fake.2.1 +BackupVnic2Id : ocid1.vnic.fake.2.1 +BackupVnicId : +CpuCoreCount : 2 +DbServerId : ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq +DbSystemId : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +FaultDomain : +HostIPId : ocid1.privateIp.fake.1.1 +Hostname : host-wq5t62 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz + 22lazevdaoiye7bh4iy2nwfa +LifecycleDetail : +LifecycleState : +MaintenanceType : +MemorySizeInGb : 45 +Name : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +Ocid : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +ProvisioningState : Starting +ResourceGroupName : PowerShellTestRg +SoftwareStorageSizeInGb : +StorageSizeInGb : 90 +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TimeCreated : 04/07/2024 16:09:39 +TimeMaintenanceWindowEnd : +TimeMaintenanceWindowStart : +Type : Oracle.Database/cloudVmClusters/dbNodes +Vnic2Id : ocid1.vnic.fake.1.1 +VnicId : +``` + +Start a VM in a Cloud VM Cluster resource. +For more information, execute `Get-Help Invoke-AzOracleActionDbNode`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleSwitchoverAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleSwitchoverAutonomousDatabase.md new file mode 100644 index 000000000000..774d9f338752 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Invoke-AzOracleSwitchoverAutonomousDatabase.md @@ -0,0 +1,7 @@ +### Example 1: Switchover an Autonomous Database resource +```powershell +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -PeerDbId "PeerDbId" +``` + +Switchover an Autonomous Database resource. +For more information, execute `Get-Help Invoke-AzOracleSwitchoverAutonomousDatabase`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..87f90b9e6afc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabase.md @@ -0,0 +1,75 @@ +### Example 1: Create an Autonomous Database resource +```powershell +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +[SecureString]$adbsAdminPassword = ConvertTo-SecureString -String "PowerShellTestPass123" -AsPlainText -Force + +$adbsName = "OFakePowerShellTestAdbs" +New-AzOracleAutonomousDatabase -Name $adbsName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $adbsName -DbWorkload "OLTP" -ComputeCount 2.0 -ComputeModel "ECPU" -DbVersion "19c" -DataStorageSizeInGb 32 -AdminPassword $adbsAdminPassword -LicenseModel "BringYourOwnLicense" -SubnetId $subnetId -VnetId $vnetId -DataBaseType "Regular" -CharacterSet "AL32UTF8" -NcharacterSet "AL16UTF16" +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashbur + n-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subn + ets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:19:26 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Create an Autonomous Database resource. +For more information, execute `Get-Help New-AzOracleAutonomousDatabase`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..54b209599714 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/New-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,7 @@ +### Example 1: Create a Backup for an Autonomous Database resource +```powershell +New-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -RetentionPeriodInDay 90 +``` + +Create a Backup for an Autonomous Database resource. +For more information, execute `Get-Help New-AzOracleAutonomousDatabaseBackup`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..dce0ad2b9fb2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,34 @@ +### Example 1: Create a Cloud Exadata Infrastructure resource +```powershell +New-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Location "eastus" -Zone @("2") -Shape "Exadata.X9M" -ComputeCount 3 -StorageCount 3 -DisplayName "OFake_PowerShellTestExaInfra" +``` + +```output +... +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbu + uk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsa + e5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 08:49:18 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Create a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help New-AzOracleCloudExadataInfrastructure`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..142ee78439b2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/New-AzOracleCloudVMCluster.md @@ -0,0 +1,69 @@ +### Example 1: Create a Cloud VM Cluster resource +```powershell +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +$sshPublicKey = "ssh-rsa xxx" + +$resourceGroup = "PowerShellTestRg" +$exaInfraName = "OFake_PowerShellTestExaInfra" +$exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $exaInfraName -ResourceGroupName $resourceGroup +$exaInfraId = $exaInfra.Id + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $exaInfraName -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServerOcid2 = $dbServerList[1].Ocid + +$vmClusterName = "OFake_PowerShellTestVmCluster" +New-AzOracleCloudVMCluster -Name $vmClusterName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $vmClusterName -HostName "host" -CpuCoreCount 4 -CloudExadataInfrastructureId $exaInfraId -SshPublicKey $sshPublicKey -VnetId $vnetId -GiVersion "19.0.0.0" -SubnetId $subnetId -LicenseModel "LicenseIncluded" -ClusterName "TestVMC" -MemorySizeInGb 90 -DbNodeStorageSizeInGb 180 -DataStorageSizeInTb 2.0 -DataStoragePercentage 80 -TimeZone "UTC" -DbServer @($dbServerOcid1, $dbServerOcid2) +``` + +```output +... +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-group + s/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?regio + n=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa xxx} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/sub + nets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:04:17 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +SystemVersion : +Tag : { + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Create a Cloud VM Cluster resource. +For more information, execute `Get-Help New-AzOracleCloudVMCluster`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/New-AzOracleCustomerContactObject.md b/src/Oracle/Oracle.Autorest/examples/New-AzOracleCustomerContactObject.md new file mode 100644 index 000000000000..9ca14c7e395d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/New-AzOracleCustomerContactObject.md @@ -0,0 +1,7 @@ +### Example 1: Create an in-memory object for CustomerContact +```powershell +New-AzOracleCustomerContactObject -Email "example@oracle.com" +``` + +Create an in-memory object for CustomerContact. +For more information, execute `Get-Help New-AzOracleNsgCidrObject`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/New-AzOracleNsgCidrObject.md b/src/Oracle/Oracle.Autorest/examples/New-AzOracleNsgCidrObject.md new file mode 100644 index 000000000000..ae78f36adc2a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/New-AzOracleNsgCidrObject.md @@ -0,0 +1,7 @@ +### Example 1: Create an in-memory object for NsgCidr +```powershell +New-AzOracleNsgCidrObject -Source "source" -DestinationPortRangeMax 0 -DestinationPortRangeMin 1 +``` + +Create an in-memory object for NsgCidr. +For more information, execute `Get-Help New-AzOracleNsgCidrObject`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..d38d181de1d8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabase.md @@ -0,0 +1,13 @@ +### Example 1: Delete an Autonomous Database resource +```powershell +Remove-AzOracleAutonomousDatabase -NoWait -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/e6c5d63d-1c35-427e-8183-aa8c3bb8d8cc*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-vers… +``` + +Delete an Autonomous Database resource. +For more information, execute `Get-Help Remove-AzOracleAutonomousDatabase`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..a1431e86cfd4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,7 @@ +### Example 1: Delete a Backup for an Autonomous Database resource +```powershell +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +Delete a Backup for an Autonomous Database resource. +For more information, execute `Get-Help Remove-AzOracleAutonomousDatabaseBackup`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..0be61b8f4c15 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,13 @@ +### Example 1: Delete a Cloud Exadata Infrastructure resource +```powershell +Remove-AzOracleCloudExadataInfrastructure -NoWait -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/adefb987-d10e-4d60-a429-43a6d8737e05*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-vers… +``` + +Delete a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Remove-AzOracleCloudExadataInfrastructure`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..43efe7e7446d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMCluster.md @@ -0,0 +1,13 @@ +### Example 1: Delete a Cloud VM Cluster resource +```powershell +Remove-AzOracleCloudVMCluster -NoWait -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a6742d9f-d4fe-4d66-94b4-6df3a1322228*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-vers… +``` + +Delete a Cloud VM Cluster resource. +For more information, execute `Get-Help Remove-AzOracleCloudVMCluster`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMClusterVM.md b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMClusterVM.md new file mode 100644 index 000000000000..17d56e815c32 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Remove-AzOracleCloudVMClusterVM.md @@ -0,0 +1,13 @@ +### Example 1: Remove a VM from a Cloud VM Cluster resource +```powershell +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToRemove = @($dbServerOcid1) + +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -DbServer $dbServersToRemove +``` + +Remove a VM from a Cloud VM Cluster resource. +For more information, execute `Get-Help Remove-AzOracleCloudVMClusterVM`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Restore-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/examples/Restore-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..f2495c9ed0a6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Restore-AzOracleAutonomousDatabase.md @@ -0,0 +1,8 @@ +### Example 1: Restore a Backup for an Autonomous Database resource +```powershell +$timeStamp = Get-Date +Restore-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Timestamp $timeStamp +``` + +Restore a Backup for an Autonomous Database resource. +For more information, execute `Get-Help Restore-AzOracleAutonomousDatabase`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Update-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/examples/Update-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..13f3ddab5be2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Update-AzOracleAutonomousDatabase.md @@ -0,0 +1,64 @@ +### Example 1: Update an Autonomous Database resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..a + aaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:41:08 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +Tag : { + "tagName": "tagValue" + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Update an Autonomous Database resource. +For more information, execute `Get-Help Update-AzOracleAutonomousDatabase`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..fe7f57b579f7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,70 @@ +### Example 1: Update a Cloud Exadata Infrastructure resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +ActivatedStorageCount : 3 +AdditionalStorageCount : 0 +AvailableStorageSizeInGb : 0 +ComputeCount : 3 +CpuCount : 4 +CustomerContact : +DataStorageSizeInTb : 2 +DbNodeStorageSizeInGb : 938 +DbServerVersion : 23.1.13.0.0.240410.1 +DisplayName : OFake_PowerShellTestExaInfra +EstimatedPatchingTimeEstimatedDbServerPatchingTime : +EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime : +EstimatedPatchingTimeEstimatedStorageServerPatchingTime : +EstimatedPatchingTimeTotalEstimatedPatchingTime : +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra +LastMaintenanceRunId : +LifecycleDetail : +LifecycleState : Available +Location : eastus +MaintenanceWindowCustomActionTimeoutInMin : 0 +MaintenanceWindowDaysOfWeek : +MaintenanceWindowHoursOfDay : +MaintenanceWindowIsCustomActionTimeoutEnabled : False +MaintenanceWindowIsMonthlyPatchingEnabled : +MaintenanceWindowLeadTimeInWeek : 0 +MaintenanceWindowMonth : +MaintenanceWindowPatchingMode : Rolling +MaintenanceWindowPreference : NoPreference +MaintenanceWindowWeeksOfMonth : +MaxCpuCount : 378 +MaxDataStorageInTb : 192 +MaxDbNodeStorageSizeInGb : 6729 +MaxMemoryInGb : 4170 +MemorySizeInGb : 90 +MonthlyDbServerVersion : +MonthlyStorageServerVersion : +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orps + andbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:35:54 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +Tag : { + "tagName": "tagValue" + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Update a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Update-AzOracleCloudExadataInfrastructure`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..9a1ff43a4f43 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/examples/Update-AzOracleCloudVMCluster.md @@ -0,0 +1,82 @@ +### Example 1: Update a Cloud VM Cluster resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudVMCluster -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +BackupSubnetCidr : +CloudExadataInfrastructureId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra +ClusterName : TestVMC +CompartmentId : ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +ComputeNode : +CpuCoreCount : 4 +DataCollectionOptionIsDiagnosticsEventsEnabled : False +DataCollectionOptionIsHealthMonitoringEnabled : False +DataCollectionOptionIsIncidentLogsEnabled : False +DataStoragePercentage : 80 +DataStorageSizeInTb : 2 +DbNodeStorageSizeInGb : 180 +DbServer : {ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq, ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq} +DiskRedundancy : High +DisplayName : OFake_PowerShellTestVmCluster +Domain : ocidelegated.ocipstestvnet.oraclevcn.com +GiVersion : 19.9.0.0.0 +Hostname : host-wq5t6 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster +IormConfigCacheDbPlan : +IormConfigCacheLifecycleDetail : +IormConfigCacheLifecycleState : +IormConfigCacheObjective : +IsLocalBackupEnabled : False +IsSparseDiskgroupEnabled : False +LastUpdateHistoryEntryId : +LicenseModel : LicenseIncluded +LifecycleDetail : +LifecycleState : Available +ListenerPort : 1521 +Location : eastus +MemorySizeInGb : 90 +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi + 4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compart + ment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDM + N6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwV + KPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:39:06 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +SystemVersion : +Tag : { + "tagName": "tagValue" + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Update a Cloud VM Cluster resource. +For more information, execute `Get-Help Update-AzOracleCloudVMCluster`. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/export-surface.ps1 b/src/Oracle/Oracle.Autorest/export-surface.ps1 new file mode 100644 index 000000000000..b4da87a15086 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/export-surface.ps1 @@ -0,0 +1,41 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$dll = Join-Path $PSScriptRoot 'bin\Az.Oracle.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} +$null = Import-Module -Name $dll + +$moduleName = 'Az.Oracle' +$exportsFolder = Join-Path $PSScriptRoot 'exports' +$resourcesFolder = Join-Path $PSScriptRoot 'resources' + +Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'" + +Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'" + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/exports/Add-AzOracleCloudVMClusterVM.ps1 b/src/Oracle/Oracle.Autorest/exports/Add-AzOracleCloudVMClusterVM.ps1 new file mode 100644 index 000000000000..114e06b18537 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Add-AzOracleCloudVMClusterVM.ps1 @@ -0,0 +1,269 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Add VMs to the VM Cluster +.Description +Add VMs to the VM Cluster +.Example +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToAdd = @($dbServerOcid1) + +Add-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName $resourceGroup -DbServer $dbServersToAdd + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/add-azoraclecloudvmclustervm +#> +function Add-AzOracleCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='AddExpanded')] + [Parameter(ParameterSetName='AddViaJsonFilePath')] + [Parameter(ParameterSetName='AddViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Add operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Add operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + AddExpanded = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddExpanded'; + AddViaIdentityExpanded = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddViaIdentityExpanded'; + AddViaJsonFilePath = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddViaJsonFilePath'; + AddViaJsonString = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddViaJsonString'; + } + if (('AddExpanded', 'AddViaJsonFilePath', 'AddViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabase.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabase.ps1 new file mode 100644 index 000000000000..0f2609c79ca6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabase.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabase +.Description +Get a AutonomousDatabase +.Example +Get-AzOracleAutonomousDatabase + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabase +#> +function Get-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_GetViaIdentity'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_List'; + List1 = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseBackup.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseBackup.ps1 new file mode 100644 index 000000000000..a008decdeec4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseBackup.ps1 @@ -0,0 +1,262 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabaseBackup +.Description +Get a AutonomousDatabaseBackup +.Example +Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +AUTONOMOUSDATABASEINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasebackup +#> +function Get-AzOracleAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityAutonomousDatabase', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityAutonomousDatabase', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${AutonomousDatabaseInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_GetViaIdentity'; + GetViaIdentityAutonomousDatabase = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseCharacterSet.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseCharacterSet.ps1 new file mode 100644 index 000000000000..bb8fa7665f71 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseCharacterSet.ps1 @@ -0,0 +1,254 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabaseCharacterSet +.Description +Get a AutonomousDatabaseCharacterSet +.Example +(Get-AzOracleAutonomousDatabaseCharacterSet -Location "eastus").CharacterSet + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasecharacterset +#> +function Get-AzOracleAutonomousDatabaseCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseCharacterSet name + ${Adbscharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseNationalCharacterSet.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseNationalCharacterSet.ps1 new file mode 100644 index 000000000000..9f0fc7bd4e2e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseNationalCharacterSet.ps1 @@ -0,0 +1,254 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabaseNationalCharacterSet +.Description +Get a AutonomousDatabaseNationalCharacterSet +.Example +(Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location "eastus").CharacterSet + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasenationalcharacterset +#> +function Get-AzOracleAutonomousDatabaseNationalCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseNationalCharacterSets name + ${Adbsncharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseVersion.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseVersion.ps1 new file mode 100644 index 000000000000..1c9db906bf02 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleAutonomousDatabaseVersion.ps1 @@ -0,0 +1,254 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDbVersion +.Description +Get a AutonomousDbVersion +.Example +Get-AzOracleAutonomousDatabaseVersion -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabaseversion +#> +function Get-AzOracleAutonomousDatabaseVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDbVersion name + ${Autonomousdbversionsname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudExadataInfrastructure.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..ddd39e3f6e34 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudExadataInfrastructure.ps1 @@ -0,0 +1,231 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a CloudExadataInfrastructure +.Description +Get a CloudExadataInfrastructure +.Example +Get-AzOracleCloudExadataInfrastructure +.Example +Get-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudexadatainfrastructure +#> +function Get-AzOracleCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_GetViaIdentity'; + List = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_List'; + List1 = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudVMCluster.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudVMCluster.ps1 new file mode 100644 index 000000000000..d4f2dff7f2c5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleCloudVMCluster.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a CloudVmCluster +.Description +Get a CloudVmCluster +.Example +Get-AzOracleCloudVMCluster + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudvmcluster +#> +function Get-AzOracleCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_GetViaIdentity'; + List = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_List'; + List1 = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbNode.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbNode.ps1 new file mode 100644 index 000000000000..b74c1265ff69 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbNode.ps1 @@ -0,0 +1,263 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DbNode +.Description +Get a DbNode +.Example +Get-AzOracleDbNode -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CLOUDVMCLUSTERINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbnode +#> +function Get-AzOracleDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCloudVMCluster', Mandatory)] + [Alias('Dbnodeocid')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbNode OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCloudVMCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${CloudVMClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDbNode_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDbNode_GetViaIdentity'; + GetViaIdentityCloudVMCluster = 'Az.Oracle.private\Get-AzOracleDbNode_GetViaIdentityCloudVMCluster'; + List = 'Az.Oracle.private\Get-AzOracleDbNode_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbServer.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbServer.ps1 new file mode 100644 index 000000000000..eabb0eefe34d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbServer.ps1 @@ -0,0 +1,263 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DbServer +.Description +Get a DbServer +.Example +Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CLOUDEXADATAINFRASTRUCTUREINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbserver +#> +function Get-AzOracleDbServer { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Cloudexadatainfrastructurename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCloudExadataInfrastructure', Mandatory)] + [Alias('Dbserverocid')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbServer OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCloudExadataInfrastructure', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${CloudExadataInfrastructureInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDbServer_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDbServer_GetViaIdentity'; + GetViaIdentityCloudExadataInfrastructure = 'Az.Oracle.private\Get-AzOracleDbServer_GetViaIdentityCloudExadataInfrastructure'; + List = 'Az.Oracle.private\Get-AzOracleDbServer_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbSystemShape.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbSystemShape.ps1 new file mode 100644 index 000000000000..563cb9b78658 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDbSystemShape.ps1 @@ -0,0 +1,255 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DbSystemShape +.Description +Get a DbSystemShape +.Example +Get-AzOracleDbSystemShape -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbsystemshape +#> +function Get-AzOracleDbSystemShape { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Dbsystemshapename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbSystemShape name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDbSystemShape_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDbSystemShape_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleDbSystemShape_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleDbSystemShape_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateView.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateView.ps1 new file mode 100644 index 000000000000..fd726f559f32 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateView.ps1 @@ -0,0 +1,255 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DnsPrivateView +.Description +Get a DnsPrivateView +.Example +Get-AzOracleDnsPrivateView -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivateview +#> +function Get-AzOracleDnsPrivateView { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Dnsprivateviewocid')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DnsPrivateView OCID + ${Ocid}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateZone.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateZone.ps1 new file mode 100644 index 000000000000..cfc95c09fdc8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleDnsPrivateZone.ps1 @@ -0,0 +1,255 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DnsPrivateZone +.Description +Get a DnsPrivateZone +.Example +Get-AzOracleDnsPrivateZone -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivatezone +#> +function Get-AzOracleDnsPrivateZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Dnsprivatezonename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DnsPrivateZone name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Get-AzOracleGiVersion.ps1 b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleGiVersion.ps1 new file mode 100644 index 000000000000..ac55446fd98a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Get-AzOracleGiVersion.ps1 @@ -0,0 +1,255 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a GiVersion +.Description +Get a GiVersion +.Example +Get-AzOracleGiVersion -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclegiversion +#> +function Get-AzOracleGiVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Giversionname')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # GiVersion name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleGiVersion_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleGiVersion_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleGiVersion_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleGiVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleActionDbNode.ps1 b/src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleActionDbNode.ps1 new file mode 100644 index 000000000000..22d46d953e05 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleActionDbNode.ps1 @@ -0,0 +1,317 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +VM actions on DbNode of VM Cluster by the provided filter +.Description +VM actions on DbNode of VM Cluster by the provided filter +.Example +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$stopActionName = "Stop" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $stopActionName +.Example +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$startActionName = "Start" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $startActionName + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CLOUDVMCLUSTERINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleactiondbnode +#> +function Invoke-AzOracleActionDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode])] +[CmdletBinding(DefaultParameterSetName='ActionExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityCloudVMClusterExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbNode OCID. + ${Dbnodeocid}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='ActionExpanded')] + [Parameter(ParameterSetName='ActionViaJsonFilePath')] + [Parameter(ParameterSetName='ActionViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ActionViaIdentityCloudVMClusterExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${CloudVMClusterInputObject}, + + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityCloudVMClusterExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Start", "Stop", "SoftReset", "Reset")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Db action + ${Action}, + + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Action operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Action operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ActionExpanded = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionExpanded'; + ActionViaIdentityCloudVMClusterExpanded = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded'; + ActionViaIdentityExpanded = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaIdentityExpanded'; + ActionViaJsonFilePath = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaJsonFilePath'; + ActionViaJsonString = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaJsonString'; + } + if (('ActionExpanded', 'ActionViaJsonFilePath', 'ActionViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleSwitchoverAutonomousDatabase.ps1 b/src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleSwitchoverAutonomousDatabase.ps1 new file mode 100644 index 000000000000..e89196089252 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Invoke-AzOracleSwitchoverAutonomousDatabase.ps1 @@ -0,0 +1,262 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Perform switchover action on Autonomous Database +.Description +Perform switchover action on Autonomous Database +.Example +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -PeerDbId "PeerDbId" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleswitchoverautonomousdatabase +#> +function Invoke-AzOracleSwitchoverAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='SwitchoverExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath')] + [Parameter(ParameterSetName='SwitchoverViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Switchover operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='SwitchoverViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Switchover operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + SwitchoverExpanded = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded'; + SwitchoverViaIdentityExpanded = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded'; + SwitchoverViaJsonFilePath = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath'; + SwitchoverViaJsonString = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString'; + } + if (('SwitchoverExpanded', 'SwitchoverViaJsonFilePath', 'SwitchoverViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabase.ps1 b/src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabase.ps1 new file mode 100644 index 000000000000..b2b13d42e76b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabase.ps1 @@ -0,0 +1,449 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a AutonomousDatabase +.Description +Create a AutonomousDatabase +.Example +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +[SecureString]$adbsAdminPassword = ConvertTo-SecureString -String "PowerShellTestPass123" -AsPlainText -Force + +$adbsName = "OFakePowerShellTestAdbs" +New-AzOracleAutonomousDatabase -Name $adbsName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $adbsName -DbWorkload "OLTP" -ComputeCount 2.0 -ComputeModel "ECPU" -DbVersion "19c" -DataStorageSizeInGb 32 -AdminPassword $adbsAdminPassword -LicenseModel "BringYourOwnLicense" -SubnetId $subnetId -VnetId $vnetId -DataBaseType "Regular" -CharacterSet "AL32UTF8" -NcharacterSet "AL16UTF16" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabase +#> +function New-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Autonomous Database ID + ${AutonomousDatabaseId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The character set for the autonomous database. + ${CharacterSet}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ECPU", "OCPU")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The compute model of the Autonomous Database. + ${ComputeModel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # Customer Contacts. + ${CustomerContact}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Regular", "Clone")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Database type to be created. + ${DataBaseType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # A valid Oracle Database version for Autonomous Database. + ${DbVersion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Autonomous Database workload type + ${DbWorkload}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database preview version is being provisioned. + ${IsPreviewVersionWithServiceTermsAccepted}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The character set for the Autonomous Database. + ${NcharacterSet}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The private endpoint Ip address for the resource. + ${PrivateEndpointIP}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The resource's private endpoint label. + ${PrivateEndpointLabel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStartTime}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStopTime}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The client IP access control list (ACL). + # This is an array of CIDR notations and/or IP addresses. + # Values should be separate strings, separated by commas. + # Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + ${WhitelistedIP}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleAutonomousDatabase_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleAutonomousDatabase_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleAutonomousDatabase_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabaseBackup.ps1 b/src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabaseBackup.ps1 new file mode 100644 index 000000000000..cd5bff72df44 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/New-AzOracleAutonomousDatabaseBackup.ps1 @@ -0,0 +1,234 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a AutonomousDatabaseBackup +.Description +Create a AutonomousDatabaseBackup +.Example +New-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -RetentionPeriodInDay 90 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabasebackup +#> +function New-AzOracleAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The user-friendly name for the backup. + # The name does not have to be unique. + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups. + ${RetentionPeriodInDay}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleAutonomousDatabaseBackup_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleAutonomousDatabaseBackup_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudExadataInfrastructure.ps1 b/src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..0f7f8700a083 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudExadataInfrastructure.ps1 @@ -0,0 +1,357 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a CloudExadataInfrastructure +.Description +Create a CloudExadataInfrastructure +.Example +New-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Location "eastus" -Zone @("2") -Shape "Exadata.X9M" -ComputeCount 3 -StorageCount 3 -DisplayName "OFake_PowerShellTestExaInfra" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudexadatainfrastructure +#> +function New-AzOracleCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + # Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + # Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + ${CustomerContact}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Determines the amount of time the system will wait before the start of each database server patching operation. + # Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # The window of hours during the day when maintenance should be performed. + # The window is a 4 hour slot. + # Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + ${MaintenanceWindowHoursOfDay}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Lead time window allows user to set a lead time to prepare for a down time. + # The lead time is in weeks and valid value is between 1 to 4. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[]] + # Months during the year when maintenance should be performed. + ${MaintenanceWindowMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # Weeks during the month when maintenance should be performed. + # Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. + # Weeks start and end based on calendar dates, not days of the week. + # For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. + # Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. + # Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The model name of the cloud Exadata infrastructure resource. + ${Shape}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleCloudExadataInfrastructure_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleCloudExadataInfrastructure_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleCloudExadataInfrastructure_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudVMCluster.ps1 b/src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudVMCluster.ps1 new file mode 100644 index 000000000000..a71c44d7bcad --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/New-AzOracleCloudVMCluster.ps1 @@ -0,0 +1,452 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a CloudVmCluster +.Description +Create a CloudVmCluster +.Example +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +$sshPublicKey = "ssh-rsa xxx" + +$resourceGroup = "PowerShellTestRg" +$exaInfraName = "OFake_PowerShellTestExaInfra" +$exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $exaInfraName -ResourceGroupName $resourceGroup +$exaInfraId = $exaInfra.Id + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $exaInfraName -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServerOcid2 = $dbServerList[1].Ocid + +$vmClusterName = "OFake_PowerShellTestVmCluster" +New-AzOracleCloudVMCluster -Name $vmClusterName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $vmClusterName -HostName "host" -CpuCoreCount 4 -CloudExadataInfrastructureId $exaInfraId -SshPublicKey $sshPublicKey -VnetId $vnetId -GiVersion "19.0.0.0" -SubnetId $subnetId -LicenseModel "LicenseIncluded" -ClusterName "TestVMC" -MemorySizeInGb 90 -DbNodeStorageSizeInGb 180 -DataStorageSizeInTb 2.0 -DataStoragePercentage 80 -TimeZone "UTC" -DbServer @($dbServerOcid1, $dbServerOcid2) + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NSGCIDR : CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + Source : Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + [DestinationPortRangeMax ]: The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value. + [DestinationPortRangeMin ]: The minimum port number, which must not be greater than the maximum port number. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudvmcluster +#> +function New-AzOracleCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Client OCI backup subnet CIDR, default is 192.168.252.0/22 + ${BackupSubnetCidr}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Cloud Exadata Infrastructure ID + ${CloudExadataInfrastructureId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The cluster name for cloud VM cluster. + # The cluster name must begin with an alphabetic character, and may contain hyphens (-). + # Underscores (_) are not permitted. + # The cluster name can be no longer than 11 characters and is not case sensitive. + ${ClusterName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The percentage assigned to DATA storage (user data and database files). + # The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). + # Accepted values are 35, 40, 60 and 80. + # The default is 80 percent assigned to DATA storage. + # See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + ${DataStoragePercentage}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The list of DB servers. + ${DbServer}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The domain name for the cloud VM cluster. + ${Domain}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Oracle Grid Infrastructure (GI) software version + ${GiVersion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The hostname for the cloud VM cluster. + ${Hostname}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, database backup on local Exadata storage is configured for the cloud VM cluster. + # If false, database backup on local Exadata storage is not available in the cloud VM cluster. + ${IsLocalBackupEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, sparse disk group is configured for the cloud VM cluster. + # If false, sparse disk group is not created. + ${IsSparseDiskgroupEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr[]] + # CIDR blocks for additional NSG ingress rules. + # The VNET CIDRs used to provision the VM Cluster will be added by default. + ${NsgCidr}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The TCP Single Client Access Name (SCAN) port. + # The default port is 1521. + ${ScanListenerPortTcp}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The TCPS Single Client Access Name (SCAN) port. + # The default port is 2484. + ${ScanListenerPortTcpSsl}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Operating system version of the image. + ${SystemVersion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The time zone of the cloud VM cluster. + # For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + ${TimeZone}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The OCID of the zone the cloud VM cluster is associated with. + ${ZoneId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleCloudVMCluster_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleCloudVMCluster_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleCloudVMCluster_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/New-AzOracleCustomerContactObject.ps1 b/src/Oracle/Oracle.Autorest/exports/New-AzOracleCustomerContactObject.ps1 new file mode 100644 index 000000000000..ec28367b74bd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/New-AzOracleCustomerContactObject.ps1 @@ -0,0 +1,117 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for CustomerContact. +.Description +Create an in-memory object for CustomerContact. +.Example +New-AzOracleCustomerContactObject -Email "example@oracle.com" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact +.Link +https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclecustomercontactobject +#> +function New-AzOracleCustomerContactObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The email address used by Oracle to send notifications regarding databases and infrastructure. + ${Email} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Oracle.custom\New-AzOracleCustomerContactObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/New-AzOracleNsgCidrObject.ps1 b/src/Oracle/Oracle.Autorest/exports/New-AzOracleNsgCidrObject.ps1 new file mode 100644 index 000000000000..8331637177b0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/New-AzOracleNsgCidrObject.ps1 @@ -0,0 +1,130 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for NsgCidr. +.Description +Create an in-memory object for NsgCidr. +.Example +New-AzOracleNsgCidrObject -Source "source" -DestinationPortRangeMax 0 -DestinationPortRangeMin 1 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr +.Link +https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclensgcidrobject +#> +function New-AzOracleNsgCidrObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + ${Source}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The maximum port number, which must not be less than the minimum port number. + # To specify a single port number, set both the min and max to the same value. + ${DestinationPortRangeMax}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The minimum port number, which must not be greater than the maximum port number. + ${DestinationPortRangeMin} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Oracle.custom\New-AzOracleNsgCidrObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Oracle/Oracle.Autorest/exports/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..c189f2d86d50 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,8208 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Add VMs to the VM Cluster +.Description +Add VMs to the VM Cluster +.Example +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToAdd = @($dbServerOcid1) + +Add-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName $resourceGroup -DbServer $dbServersToAdd + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/add-azoraclecloudvmclustervm +#> +function Add-AzOracleCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='AddExpanded')] + [Parameter(ParameterSetName='AddViaJsonFilePath')] + [Parameter(ParameterSetName='AddViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter(ParameterSetName='AddViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Add operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='AddViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Add operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + AddExpanded = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddExpanded'; + AddViaIdentityExpanded = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddViaIdentityExpanded'; + AddViaJsonFilePath = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddViaJsonFilePath'; + AddViaJsonString = 'Az.Oracle.private\Add-AzOracleCloudVMClusterVM_AddViaJsonString'; + } + if (('AddExpanded', 'AddViaJsonFilePath', 'AddViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabaseBackup +.Description +Get a AutonomousDatabaseBackup +.Example +Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +AUTONOMOUSDATABASEINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasebackup +#> +function Get-AzOracleAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityAutonomousDatabase', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityAutonomousDatabase', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${AutonomousDatabaseInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_GetViaIdentity'; + GetViaIdentityAutonomousDatabase = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseBackup_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabaseCharacterSet +.Description +Get a AutonomousDatabaseCharacterSet +.Example +(Get-AzOracleAutonomousDatabaseCharacterSet -Location "eastus").CharacterSet + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasecharacterset +#> +function Get-AzOracleAutonomousDatabaseCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseCharacterSet name + ${Adbscharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseCharacterSet_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabaseNationalCharacterSet +.Description +Get a AutonomousDatabaseNationalCharacterSet +.Example +(Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location "eastus").CharacterSet + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasenationalcharacterset +#> +function Get-AzOracleAutonomousDatabaseNationalCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseNationalCharacterSets name + ${Adbsncharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseNationalCharacterSet_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDbVersion +.Description +Get a AutonomousDbVersion +.Example +Get-AzOracleAutonomousDatabaseVersion -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabaseversion +#> +function Get-AzOracleAutonomousDatabaseVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDbVersion name + ${Autonomousdbversionsname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabaseVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabase +.Description +Get a AutonomousDatabase +.Example +Get-AzOracleAutonomousDatabase + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabase +#> +function Get-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_GetViaIdentity'; + List = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_List'; + List1 = 'Az.Oracle.private\Get-AzOracleAutonomousDatabase_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a CloudExadataInfrastructure +.Description +Get a CloudExadataInfrastructure +.Example +Get-AzOracleCloudExadataInfrastructure +.Example +Get-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudexadatainfrastructure +#> +function Get-AzOracleCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_GetViaIdentity'; + List = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_List'; + List1 = 'Az.Oracle.private\Get-AzOracleCloudExadataInfrastructure_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a CloudVmCluster +.Description +Get a CloudVmCluster +.Example +Get-AzOracleCloudVMCluster + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudvmcluster +#> +function Get-AzOracleCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_GetViaIdentity'; + List = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_List'; + List1 = 'Az.Oracle.private\Get-AzOracleCloudVMCluster_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DbNode +.Description +Get a DbNode +.Example +Get-AzOracleDbNode -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CLOUDVMCLUSTERINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbnode +#> +function Get-AzOracleDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCloudVMCluster', Mandatory)] + [Alias('Dbnodeocid')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbNode OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCloudVMCluster', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${CloudVMClusterInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDbNode_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDbNode_GetViaIdentity'; + GetViaIdentityCloudVMCluster = 'Az.Oracle.private\Get-AzOracleDbNode_GetViaIdentityCloudVMCluster'; + List = 'Az.Oracle.private\Get-AzOracleDbNode_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DbServer +.Description +Get a DbServer +.Example +Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CLOUDEXADATAINFRASTRUCTUREINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbserver +#> +function Get-AzOracleDbServer { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Cloudexadatainfrastructurename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityCloudExadataInfrastructure', Mandatory)] + [Alias('Dbserverocid')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbServer OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityCloudExadataInfrastructure', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${CloudExadataInfrastructureInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDbServer_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDbServer_GetViaIdentity'; + GetViaIdentityCloudExadataInfrastructure = 'Az.Oracle.private\Get-AzOracleDbServer_GetViaIdentityCloudExadataInfrastructure'; + List = 'Az.Oracle.private\Get-AzOracleDbServer_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DbSystemShape +.Description +Get a DbSystemShape +.Example +Get-AzOracleDbSystemShape -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbsystemshape +#> +function Get-AzOracleDbSystemShape { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Dbsystemshapename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbSystemShape name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDbSystemShape_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDbSystemShape_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleDbSystemShape_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleDbSystemShape_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DnsPrivateView +.Description +Get a DnsPrivateView +.Example +Get-AzOracleDnsPrivateView -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivateview +#> +function Get-AzOracleDnsPrivateView { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Dnsprivateviewocid')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DnsPrivateView OCID + ${Ocid}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleDnsPrivateView_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DnsPrivateZone +.Description +Get a DnsPrivateZone +.Example +Get-AzOracleDnsPrivateZone -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivatezone +#> +function Get-AzOracleDnsPrivateZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Dnsprivatezonename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DnsPrivateZone name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleDnsPrivateZone_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a GiVersion +.Description +Get a GiVersion +.Example +Get-AzOracleGiVersion -Location "eastus" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +LOCATIONINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclegiversion +#> +function Get-AzOracleGiVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory)] + [Alias('Giversionname')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # GiVersion name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityLocation', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${LocationInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.Oracle.private\Get-AzOracleGiVersion_Get'; + GetViaIdentity = 'Az.Oracle.private\Get-AzOracleGiVersion_GetViaIdentity'; + GetViaIdentityLocation = 'Az.Oracle.private\Get-AzOracleGiVersion_GetViaIdentityLocation'; + List = 'Az.Oracle.private\Get-AzOracleGiVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +VM actions on DbNode of VM Cluster by the provided filter +.Description +VM actions on DbNode of VM Cluster by the provided filter +.Example +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$stopActionName = "Stop" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $stopActionName +.Example +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$startActionName = "Start" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $startActionName + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CLOUDVMCLUSTERINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleactiondbnode +#> +function Invoke-AzOracleActionDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode])] +[CmdletBinding(DefaultParameterSetName='ActionExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityCloudVMClusterExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # DbNode OCID. + ${Dbnodeocid}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='ActionExpanded')] + [Parameter(ParameterSetName='ActionViaJsonFilePath')] + [Parameter(ParameterSetName='ActionViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ActionViaIdentityCloudVMClusterExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${CloudVMClusterInputObject}, + + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityCloudVMClusterExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Start", "Stop", "SoftReset", "Reset")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Db action + ${Action}, + + [Parameter(ParameterSetName='ActionViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Action operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ActionViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Action operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + ActionExpanded = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionExpanded'; + ActionViaIdentityCloudVMClusterExpanded = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded'; + ActionViaIdentityExpanded = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaIdentityExpanded'; + ActionViaJsonFilePath = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaJsonFilePath'; + ActionViaJsonString = 'Az.Oracle.private\Invoke-AzOracleActionDbNode_ActionViaJsonString'; + } + if (('ActionExpanded', 'ActionViaJsonFilePath', 'ActionViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Perform switchover action on Autonomous Database +.Description +Perform switchover action on Autonomous Database +.Example +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -PeerDbId "PeerDbId" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleswitchoverautonomousdatabase +#> +function Invoke-AzOracleSwitchoverAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='SwitchoverExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='SwitchoverViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath')] + [Parameter(ParameterSetName='SwitchoverViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter(ParameterSetName='SwitchoverViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Switchover operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='SwitchoverViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Switchover operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + SwitchoverExpanded = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded'; + SwitchoverViaIdentityExpanded = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded'; + SwitchoverViaJsonFilePath = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath'; + SwitchoverViaJsonString = 'Az.Oracle.private\Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString'; + } + if (('SwitchoverExpanded', 'SwitchoverViaJsonFilePath', 'SwitchoverViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a AutonomousDatabaseBackup +.Description +Create a AutonomousDatabaseBackup +.Example +New-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -RetentionPeriodInDay 90 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabasebackup +#> +function New-AzOracleAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The user-friendly name for the backup. + # The name does not have to be unique. + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups. + ${RetentionPeriodInDay}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleAutonomousDatabaseBackup_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleAutonomousDatabaseBackup_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a AutonomousDatabase +.Description +Create a AutonomousDatabase +.Example +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +[SecureString]$adbsAdminPassword = ConvertTo-SecureString -String "PowerShellTestPass123" -AsPlainText -Force + +$adbsName = "OFakePowerShellTestAdbs" +New-AzOracleAutonomousDatabase -Name $adbsName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $adbsName -DbWorkload "OLTP" -ComputeCount 2.0 -ComputeModel "ECPU" -DbVersion "19c" -DataStorageSizeInGb 32 -AdminPassword $adbsAdminPassword -LicenseModel "BringYourOwnLicense" -SubnetId $subnetId -VnetId $vnetId -DataBaseType "Regular" -CharacterSet "AL32UTF8" -NcharacterSet "AL16UTF16" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabase +#> +function New-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Autonomous Database ID + ${AutonomousDatabaseId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The character set for the autonomous database. + ${CharacterSet}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ECPU", "OCPU")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The compute model of the Autonomous Database. + ${ComputeModel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # Customer Contacts. + ${CustomerContact}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Regular", "Clone")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Database type to be created. + ${DataBaseType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # A valid Oracle Database version for Autonomous Database. + ${DbVersion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Autonomous Database workload type + ${DbWorkload}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database preview version is being provisioned. + ${IsPreviewVersionWithServiceTermsAccepted}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The character set for the Autonomous Database. + ${NcharacterSet}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The private endpoint Ip address for the resource. + ${PrivateEndpointIP}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The resource's private endpoint label. + ${PrivateEndpointLabel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStartTime}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStopTime}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The client IP access control list (ACL). + # This is an array of CIDR notations and/or IP addresses. + # Values should be separate strings, separated by commas. + # Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + ${WhitelistedIP}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleAutonomousDatabase_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleAutonomousDatabase_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleAutonomousDatabase_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a CloudExadataInfrastructure +.Description +Create a CloudExadataInfrastructure +.Example +New-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Location "eastus" -Zone @("2") -Shape "Exadata.X9M" -ComputeCount 3 -StorageCount 3 -DisplayName "OFake_PowerShellTestExaInfra" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudexadatainfrastructure +#> +function New-AzOracleCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + # Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + # Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + ${CustomerContact}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Determines the amount of time the system will wait before the start of each database server patching operation. + # Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # The window of hours during the day when maintenance should be performed. + # The window is a 4 hour slot. + # Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + ${MaintenanceWindowHoursOfDay}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Lead time window allows user to set a lead time to prepare for a down time. + # The lead time is in weeks and valid value is between 1 to 4. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[]] + # Months during the year when maintenance should be performed. + ${MaintenanceWindowMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # Weeks during the month when maintenance should be performed. + # Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. + # Weeks start and end based on calendar dates, not days of the week. + # For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. + # Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. + # Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The model name of the cloud Exadata infrastructure resource. + ${Shape}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleCloudExadataInfrastructure_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleCloudExadataInfrastructure_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleCloudExadataInfrastructure_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a CloudVmCluster +.Description +Create a CloudVmCluster +.Example +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +$sshPublicKey = "ssh-rsa xxx" + +$resourceGroup = "PowerShellTestRg" +$exaInfraName = "OFake_PowerShellTestExaInfra" +$exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $exaInfraName -ResourceGroupName $resourceGroup +$exaInfraId = $exaInfra.Id + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $exaInfraName -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServerOcid2 = $dbServerList[1].Ocid + +$vmClusterName = "OFake_PowerShellTestVmCluster" +New-AzOracleCloudVMCluster -Name $vmClusterName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $vmClusterName -HostName "host" -CpuCoreCount 4 -CloudExadataInfrastructureId $exaInfraId -SshPublicKey $sshPublicKey -VnetId $vnetId -GiVersion "19.0.0.0" -SubnetId $subnetId -LicenseModel "LicenseIncluded" -ClusterName "TestVMC" -MemorySizeInGb 90 -DbNodeStorageSizeInGb 180 -DataStorageSizeInTb 2.0 -DataStoragePercentage 80 -TimeZone "UTC" -DbServer @($dbServerOcid1, $dbServerOcid2) + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NSGCIDR : CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + Source : Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + [DestinationPortRangeMax ]: The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value. + [DestinationPortRangeMin ]: The minimum port number, which must not be greater than the maximum port number. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudvmcluster +#> +function New-AzOracleCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Client OCI backup subnet CIDR, default is 192.168.252.0/22 + ${BackupSubnetCidr}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Cloud Exadata Infrastructure ID + ${CloudExadataInfrastructureId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The cluster name for cloud VM cluster. + # The cluster name must begin with an alphabetic character, and may contain hyphens (-). + # Underscores (_) are not permitted. + # The cluster name can be no longer than 11 characters and is not case sensitive. + ${ClusterName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The percentage assigned to DATA storage (user data and database files). + # The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). + # Accepted values are 35, 40, 60 and 80. + # The default is 80 percent assigned to DATA storage. + # See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + ${DataStoragePercentage}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The list of DB servers. + ${DbServer}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The domain name for the cloud VM cluster. + ${Domain}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Oracle Grid Infrastructure (GI) software version + ${GiVersion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The hostname for the cloud VM cluster. + ${Hostname}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, database backup on local Exadata storage is configured for the cloud VM cluster. + # If false, database backup on local Exadata storage is not available in the cloud VM cluster. + ${IsLocalBackupEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, sparse disk group is configured for the cloud VM cluster. + # If false, sparse disk group is not created. + ${IsSparseDiskgroupEnabled}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr[]] + # CIDR blocks for additional NSG ingress rules. + # The VNET CIDRs used to provision the VM Cluster will be added by default. + ${NsgCidr}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The TCP Single Client Access Name (SCAN) port. + # The default port is 1521. + ${ScanListenerPortTcp}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The TCPS Single Client Access Name (SCAN) port. + # The default port is 2484. + ${ScanListenerPortTcpSsl}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Operating system version of the image. + ${SystemVersion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The time zone of the cloud VM cluster. + # For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + ${TimeZone}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The OCID of the zone the cloud VM cluster is associated with. + ${ZoneId}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.Oracle.private\New-AzOracleCloudVMCluster_CreateExpanded'; + CreateViaJsonFilePath = 'Az.Oracle.private\New-AzOracleCloudVMCluster_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.Oracle.private\New-AzOracleCloudVMCluster_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a AutonomousDatabaseBackup +.Description +Delete a AutonomousDatabaseBackup +.Example +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +AUTONOMOUSDATABASEINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabasebackup +#> +function Remove-AzOracleAutonomousDatabaseBackup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityAutonomousDatabase', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityAutonomousDatabase', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${AutonomousDatabaseInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabaseBackup_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabaseBackup_DeleteViaIdentity'; + DeleteViaIdentityAutonomousDatabase = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a AutonomousDatabase +.Description +Delete a AutonomousDatabase +.Example +Remove-AzOracleAutonomousDatabase -NoWait -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabase +#> +function Remove-AzOracleAutonomousDatabase { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabase_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabase_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a CloudExadataInfrastructure +.Description +Delete a CloudExadataInfrastructure +.Example +Remove-AzOracleCloudExadataInfrastructure -NoWait -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudexadatainfrastructure +#> +function Remove-AzOracleCloudExadataInfrastructure { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleCloudExadataInfrastructure_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleCloudExadataInfrastructure_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Remove VMs from the VM Cluster +.Description +Remove VMs from the VM Cluster +.Example +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToRemove = @($dbServerOcid1) + +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -DbServer $dbServersToRemove + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Add/Remove (Virtual Machine) DbNode model + DbServer >: Db servers ocids + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmclustervm +#> +function Remove-AzOracleCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='RemoveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Remove')] + [Parameter(ParameterSetName='RemoveExpanded')] + [Parameter(ParameterSetName='RemoveViaJsonFilePath')] + [Parameter(ParameterSetName='RemoveViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='Remove', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode] + # Add/Remove (Virtual Machine) DbNode model + ${Body}, + + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter(ParameterSetName='RemoveViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Remove operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RemoveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Remove operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Remove = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_Remove'; + RemoveExpanded = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveExpanded'; + RemoveViaIdentity = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaIdentity'; + RemoveViaIdentityExpanded = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaIdentityExpanded'; + RemoveViaJsonFilePath = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaJsonFilePath'; + RemoveViaJsonString = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaJsonString'; + } + if (('Remove', 'RemoveExpanded', 'RemoveViaJsonFilePath', 'RemoveViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a CloudVmCluster +.Description +Delete a CloudVmCluster +.Example +Remove-AzOracleCloudVMCluster -NoWait -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmcluster +#> +function Remove-AzOracleCloudVMCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleCloudVMCluster_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleCloudVMCluster_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Restores an Autonomous Database based on the provided request parameters. +.Description +Restores an Autonomous Database based on the provided request parameters. +.Example +$timeStamp = Get-Date +Restore-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Timestamp $timeStamp + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Details to restore an Oracle Autonomous Database. + Timestamp : The time to restore the database to. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/restore-azoracleautonomousdatabase +#> +function Restore-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='RestoreExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonString', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Restore')] + [Parameter(ParameterSetName='RestoreExpanded')] + [Parameter(ParameterSetName='RestoreViaJsonFilePath')] + [Parameter(ParameterSetName='RestoreViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='Restore', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails] + # Details to restore an Oracle Autonomous Database. + ${Body}, + + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.DateTime] + # The time to restore the database to. + ${Timestamp}, + + [Parameter(ParameterSetName='RestoreViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Restore operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RestoreViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Restore operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Restore = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_Restore'; + RestoreExpanded = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreExpanded'; + RestoreViaIdentity = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaIdentity'; + RestoreViaIdentityExpanded = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaIdentityExpanded'; + RestoreViaJsonFilePath = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaJsonFilePath'; + RestoreViaJsonString = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaJsonString'; + } + if (('Restore', 'RestoreExpanded', 'RestoreViaJsonFilePath', 'RestoreViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a AutonomousDatabase +.Description +Update a AutonomousDatabase +.Example +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/update-azoracleautonomousdatabase +#> +function Update-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # Customer Contacts. + ${CustomerContact}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard + ${LocalAdgAutoFailoverMaxDataLossLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if the long-term backup schedule should be deleted. + # The default value is `FALSE`. + ${LongTermBackupScheduleIsDisabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The frequency of the long-term backup schedule + ${LongTermBackupScheduleRepeatCadence}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for backups. + ${LongTermBackupScheduleRetentionPeriodInDay}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.DateTime] + # The timestamp for the long-term backup schedule. + # For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + ${LongTermBackupScheduleTimeOfBackup}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Indicates the Autonomous Database mode. + ${OpenMode}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Autonomous Database permission level. + ${PermissionLevel}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + ${Role}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStartTime}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStopTime}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The client IP access control list (ACL). + # This is an array of CIDR notations and/or IP addresses. + # Values should be separate strings, separated by commas. + # Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + ${WhitelistedIP}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a CloudExadataInfrastructure +.Description +Update a CloudExadataInfrastructure +.Example +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudexadatainfrastructure +#> +function Update-AzOracleCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + # Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + # Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + ${CustomerContact}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Determines the amount of time the system will wait before the start of each database server patching operation. + # Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # The window of hours during the day when maintenance should be performed. + # The window is a 4 hour slot. + # Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + ${MaintenanceWindowHoursOfDay}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Lead time window allows user to set a lead time to prepare for a down time. + # The lead time is in weeks and valid value is between 1 to 4. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[]] + # Months during the year when maintenance should be performed. + ${MaintenanceWindowMonth}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # Weeks during the month when maintenance should be performed. + # Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. + # Weeks start and end based on calendar dates, not days of the week. + # For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. + # Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. + # Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a CloudVmCluster +.Description +Update a CloudVmCluster +.Example +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudVMCluster -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudvmcluster +#> +function Update-AzOracleCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The list of compute servers to be added to the cloud VM cluster. + ${ComputeNode}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The data disk group size to be allocated in GBs per VM. + ${StorageSizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for CustomerContact. +.Description +Create an in-memory object for CustomerContact. +.Example +New-AzOracleCustomerContactObject -Email "example@oracle.com" + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact +.Link +https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclecustomercontactobject +#> +function New-AzOracleCustomerContactObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The email address used by Oracle to send notifications regarding databases and infrastructure. + ${Email} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Oracle.custom\New-AzOracleCustomerContactObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create an in-memory object for NsgCidr. +.Description +Create an in-memory object for NsgCidr. +.Example +New-AzOracleNsgCidrObject -Source "source" -DestinationPortRangeMax 0 -DestinationPortRangeMin 1 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr +.Link +https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclensgcidrobject +#> +function New-AzOracleNsgCidrObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + ${Source}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The maximum port number, which must not be less than the minimum port number. + # To specify a single port number, set both the min and max to the same value. + ${DestinationPortRangeMax}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The minimum port number, which must not be greater than the maximum port number. + ${DestinationPortRangeMin} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + __AllParameterSets = 'Az.Oracle.custom\New-AzOracleNsgCidrObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/README.md b/src/Oracle/Oracle.Autorest/exports/README.md new file mode 100644 index 000000000000..40056485dfb6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/README.md @@ -0,0 +1,20 @@ +# Exports +This directory contains the cmdlets *exported by* `Az.Oracle`. No other cmdlets in this repository are directly exported. What that means is the `Az.Oracle` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.Oracle.private.dll`) and from the `..\custom\Az.Oracle.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [README.md](..\internal/README.md) in the `..\internal` folder. + +## Purpose +We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles. + +## Structure +The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile. + +## Usage +When `./Az.Oracle.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabase.ps1 b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabase.ps1 new file mode 100644 index 000000000000..e98a5aa634f2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabase.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a AutonomousDatabase +.Description +Delete a AutonomousDatabase +.Example +Remove-AzOracleAutonomousDatabase -NoWait -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabase +#> +function Remove-AzOracleAutonomousDatabase { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabase_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabase_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabaseBackup.ps1 b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabaseBackup.ps1 new file mode 100644 index 000000000000..e090c031f1ad --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleAutonomousDatabaseBackup.ps1 @@ -0,0 +1,276 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a AutonomousDatabaseBackup +.Description +Delete a AutonomousDatabaseBackup +.Example +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +AUTONOMOUSDATABASEINPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabasebackup +#> +function Remove-AzOracleAutonomousDatabaseBackup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityAutonomousDatabase', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityAutonomousDatabase', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${AutonomousDatabaseInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabaseBackup_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabaseBackup_DeleteViaIdentity'; + DeleteViaIdentityAutonomousDatabase = 'Az.Oracle.private\Remove-AzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudExadataInfrastructure.ps1 b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..268e8465cab8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudExadataInfrastructure.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a CloudExadataInfrastructure +.Description +Delete a CloudExadataInfrastructure +.Example +Remove-AzOracleCloudExadataInfrastructure -NoWait -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudexadatainfrastructure +#> +function Remove-AzOracleCloudExadataInfrastructure { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleCloudExadataInfrastructure_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleCloudExadataInfrastructure_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMCluster.ps1 b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMCluster.ps1 new file mode 100644 index 000000000000..780d7ffd7f14 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMCluster.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a CloudVmCluster +.Description +Delete a CloudVmCluster +.Example +Remove-AzOracleCloudVMCluster -NoWait -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmcluster +#> +function Remove-AzOracleCloudVMCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.Oracle.private\Remove-AzOracleCloudVMCluster_Delete'; + DeleteViaIdentity = 'Az.Oracle.private\Remove-AzOracleCloudVMCluster_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMClusterVM.ps1 b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMClusterVM.ps1 new file mode 100644 index 000000000000..a8cc748a2f71 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Remove-AzOracleCloudVMClusterVM.ps1 @@ -0,0 +1,287 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Remove VMs from the VM Cluster +.Description +Remove VMs from the VM Cluster +.Example +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToRemove = @($dbServerOcid1) + +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -DbServer $dbServersToRemove + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Add/Remove (Virtual Machine) DbNode model + DbServer >: Db servers ocids + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmclustervm +#> +function Remove-AzOracleCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='RemoveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RemoveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Remove')] + [Parameter(ParameterSetName='RemoveExpanded')] + [Parameter(ParameterSetName='RemoveViaJsonFilePath')] + [Parameter(ParameterSetName='RemoveViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='Remove', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode] + # Add/Remove (Virtual Machine) DbNode model + ${Body}, + + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter(ParameterSetName='RemoveViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Remove operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RemoveViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Remove operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Remove = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_Remove'; + RemoveExpanded = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveExpanded'; + RemoveViaIdentity = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaIdentity'; + RemoveViaIdentityExpanded = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaIdentityExpanded'; + RemoveViaJsonFilePath = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaJsonFilePath'; + RemoveViaJsonString = 'Az.Oracle.private\Remove-AzOracleCloudVMClusterVM_RemoveViaJsonString'; + } + if (('Remove', 'RemoveExpanded', 'RemoveViaJsonFilePath', 'RemoveViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Restore-AzOracleAutonomousDatabase.ps1 b/src/Oracle/Oracle.Autorest/exports/Restore-AzOracleAutonomousDatabase.ps1 new file mode 100644 index 000000000000..f7327508d28e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Restore-AzOracleAutonomousDatabase.ps1 @@ -0,0 +1,282 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Restores an Autonomous Database based on the provided request parameters. +.Description +Restores an Autonomous Database based on the provided request parameters. +.Example +$timeStamp = Get-Date +Restore-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Timestamp $timeStamp + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Details to restore an Oracle Autonomous Database. + Timestamp : The time to restore the database to. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/restore-azoracleautonomousdatabase +#> +function Restore-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='RestoreExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonString', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='RestoreViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Restore')] + [Parameter(ParameterSetName='RestoreExpanded')] + [Parameter(ParameterSetName='RestoreViaJsonFilePath')] + [Parameter(ParameterSetName='RestoreViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='Restore', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails] + # Details to restore an Oracle Autonomous Database. + ${Body}, + + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.DateTime] + # The time to restore the database to. + ${Timestamp}, + + [Parameter(ParameterSetName='RestoreViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Restore operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='RestoreViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Restore operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Restore = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_Restore'; + RestoreExpanded = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreExpanded'; + RestoreViaIdentity = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaIdentity'; + RestoreViaIdentityExpanded = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaIdentityExpanded'; + RestoreViaJsonFilePath = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaJsonFilePath'; + RestoreViaJsonString = 'Az.Oracle.private\Restore-AzOracleAutonomousDatabase_RestoreViaJsonString'; + } + if (('Restore', 'RestoreExpanded', 'RestoreViaJsonFilePath', 'RestoreViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Update-AzOracleAutonomousDatabase.ps1 b/src/Oracle/Oracle.Autorest/exports/Update-AzOracleAutonomousDatabase.ps1 new file mode 100644 index 000000000000..518e32b5bb7b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Update-AzOracleAutonomousDatabase.ps1 @@ -0,0 +1,482 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a AutonomousDatabase +.Description +Update a AutonomousDatabase +.Example +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/update-azoracleautonomousdatabase +#> +function Update-AzOracleAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # Customer Contacts. + ${CustomerContact}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard + ${LocalAdgAutoFailoverMaxDataLossLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if the long-term backup schedule should be deleted. + # The default value is `FALSE`. + ${LongTermBackupScheduleIsDisabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The frequency of the long-term backup schedule + ${LongTermBackupScheduleRepeatCadence}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Retention period, in days, for backups. + ${LongTermBackupScheduleRetentionPeriodInDay}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.DateTime] + # The timestamp for the long-term backup schedule. + # For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + ${LongTermBackupScheduleTimeOfBackup}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Indicates the Autonomous Database mode. + ${OpenMode}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Autonomous Database permission level. + ${PermissionLevel}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + ${Role}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStartTime}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledStopTime}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The client IP access control list (ACL). + # This is an array of CIDR notations and/or IP addresses. + # Values should be separate strings, separated by commas. + # Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + ${WhitelistedIP}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Oracle.private\Update-AzOracleAutonomousDatabase_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudExadataInfrastructure.ps1 b/src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..01bd466fe0eb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudExadataInfrastructure.ps1 @@ -0,0 +1,398 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a CloudExadataInfrastructure +.Description +Update a CloudExadataInfrastructure +.Example +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudexadatainfrastructure +#> +function Update-AzOracleCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[]] + # The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + # Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. + # Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + ${CustomerContact}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Determines the amount of time the system will wait before the start of each database server patching operation. + # Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # The window of hours during the day when maintenance should be performed. + # The window is a 4 hour slot. + # Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + ${MaintenanceWindowHoursOfDay}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # Lead time window allows user to set a lead time to prepare for a down time. + # The lead time is in weeks and valid value is between 1 to 4. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[]] + # Months during the year when maintenance should be performed. + ${MaintenanceWindowMonth}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32[]] + # Weeks during the month when maintenance should be performed. + # Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. + # Weeks start and end based on calendar dates, not days of the week. + # For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. + # Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. + # Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Oracle.private\Update-AzOracleCloudExadataInfrastructure_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudVMCluster.ps1 b/src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudVMCluster.ps1 new file mode 100644 index 000000000000..688b1cfab493 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/exports/Update-AzOracleCloudVMCluster.ps1 @@ -0,0 +1,361 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a CloudVmCluster +.Description +Update a CloudVmCluster +.Example +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudVMCluster -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudvmcluster +#> +function Update-AzOracleCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The list of compute servers to be added to the cloud VM cluster. + ${ComputeNode}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.Int32] + # The data disk group size to be allocated in GBs per VM. + ${StorageSizeInGb}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.Oracle.private\Update-AzOracleCloudVMCluster_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/generate-help.ps1 b/src/Oracle/Oracle.Autorest/generate-help.ps1 new file mode 100644 index 000000000000..6ce13995c671 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generate-help.ps1 @@ -0,0 +1,74 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(-not (Test-Path $exportsFolder)) { + Write-Error "Exports folder '$exportsFolder' was not found." +} + +$directories = Get-ChildItem -Directory -Path $exportsFolder +$hasProfiles = ($directories | Measure-Object).Count -gt 0 +if(-not $hasProfiles) { + $directories = Get-Item -Path $exportsFolder +} + +$docsFolder = Join-Path $PSScriptRoot 'docs' +if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue +$examplesFolder = Join-Path $PSScriptRoot 'examples' + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Oracle.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.Oracle.private.dll') +$instance = [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName + +foreach($directory in $directories) +{ + if($hasProfiles) { + Select-AzProfile -Name $directory.Name + } + # Reload module per profile + Import-Module -Name $modulePath -Force + + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName + $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full } + $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo + + $docsPath = Join-Path $docsFolder $directory.Name + $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue + $examplesPath = Join-Path $examplesFolder $directory.Name + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo + Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generate-portal-ux.ps1 b/src/Oracle/Oracle.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..fdaef09a5c03 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,374 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$moduleName = 'Az.Oracle' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If (-not $FunctionName.Contains("_")) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity") -or $parameterSetName.Contains("ViaJson")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + Write-Host -ForegroundColor Yellow "There are come custom files for $cmdletName, skip generate UX data for it." + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-FunctionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} diff --git a/src/Oracle/Oracle.Autorest/generated/Module.cs b/src/Oracle/Oracle.Autorest/generated/Module.cs new file mode 100644 index 000000000000..180315e8f9cc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/Module.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>; + using GetParameterDelegate = global::System.Func; + using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; + using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; + using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; + using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using SanitizerDelegate = global::System.Action; + using GetTelemetryInfoDelegate = global::System.Func>; + + /// A class that contains the module-common code and data. + public partial class Module + { + /// The currently selected profile. + public string Profile = global::System.String.Empty; + + public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module _instance; + + /// the ISendAsync pipeline instance + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline _pipeline; + + /// the ISendAsync pipeline instance (when proxy is enabled) + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline _pipelineWithProxy; + + private static readonly global::System.Object _singletonLock = new global::System.Object(); + + public bool _useProxy = false; + + public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); + + /// Gets completion data for azure specific fields + public ArgumentCompleterDelegate ArgumentCompleter { get; set; } + + /// The instance of the Client API + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle ClientAPI { get; set; } + + /// A delegate that gets called for each signalled event + public EventListenerDelegate EventListener { get; set; } + + /// The delegate to call to get parameter data from a common module. + public GetParameterDelegate GetParameterValue { get; set; } + + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + + /// the singleton of this module class + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } + + /// The Name of this module + public string Name => @"Az.Oracle"; + + /// The delegate to call when this module is loaded (supporting a commmon module). + public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } + + /// The delegate to call before each new request (supporting a commmon module). + public NewRequestPipelineDelegate OnNewRequest { get; set; } + + /// The name of the currently selected Azure profile + public global::System.String ProfileName { get; set; } + + /// The ResourceID for this module (azure arm). + public string ResourceId => @"Az.Oracle"; + + /// The delegate to call in WriteObject to sanitize the output object. + public SanitizerDelegate SanitizeOutput { get; set; } + + /// The delegate for creating a telemetry. + public TelemetryDelegate Telemetry { get; set; } + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline pipeline); + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline pipeline); + + partial void CustomInit(); + + /// Creates an instance of the HttpPipeline for each call. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the cmdlet's parameterset name. + /// a dict for extensible parameters + /// An instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline for the remote call. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary extensibleParameters = null) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline pipeline = null; + BeforeCreatePipeline(invocationInfo, ref pipeline); + pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone(); + AfterCreatePipeline(invocationInfo, ref pipeline); + pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync); + OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } ); + return pipeline; + } + + /// Gets parameters from a common module. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// The name of the parameter to get the value for. + /// + /// The parameter value from the common module. (Note: this should be type converted on the way back) + /// + public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName ); + + /// Initialization steps performed after the module is loaded. + public void Init() + { + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } + } + + /// Creates the module instance. + private Module() + { + // constructor + ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle(); + _handler.Proxy = _webProxy; + _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); + _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler))); + } + + /// The HTTP Proxy to use. + /// The HTTP Proxy Credentials + /// True if the proxy should use default credentials + public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials) + { + _useProxy = proxy != null; + if (proxy == null) + { + return; + } + // set the proxy configuration + _webProxy.Address = proxy; + _webProxy.BypassProxyOnLocal = false; + if (proxyUseDefaultCredentials) + { + _webProxy.Credentials = null; + _webProxy.UseDefaultCredentials = true; + } + else + { + _webProxy.UseDefaultCredentials = false; + _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); + } + } + + /// Called to dispatch events to the common module listener + /// The ID of the event + /// The cancellation token for the event + /// A delegate to get the detailed event data + /// The callback for the event dispatcher + /// The from the cmdlet + /// the cmdlet's parameterset name. + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the exception that is being thrown (if available) + /// + /// A that will be complete when handling of the event is completed. + /// + public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception) + { + using( NoSynchronizationContext ) + { + await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception); + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.PowerShell.cs new file mode 100644 index 000000000000..07c67d76b73b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Activation Links model + [System.ComponentModel.TypeConverter(typeof(ActivationLinksTypeConverter))] + public partial class ActivationLinks + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ActivationLinks(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NewCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).NewCloudAccountActivationLink = (string) content.GetValueForProperty("NewCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).NewCloudAccountActivationLink, global::System.Convert.ToString); + } + if (content.Contains("ExistingCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).ExistingCloudAccountActivationLink = (string) content.GetValueForProperty("ExistingCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).ExistingCloudAccountActivationLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ActivationLinks(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NewCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).NewCloudAccountActivationLink = (string) content.GetValueForProperty("NewCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).NewCloudAccountActivationLink, global::System.Convert.ToString); + } + if (content.Contains("ExistingCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).ExistingCloudAccountActivationLink = (string) content.GetValueForProperty("ExistingCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal)this).ExistingCloudAccountActivationLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ActivationLinks(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ActivationLinks(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Activation Links model + [System.ComponentModel.TypeConverter(typeof(ActivationLinksTypeConverter))] + public partial interface IActivationLinks + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.TypeConverter.cs new file mode 100644 index 000000000000..efca5a0f990b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ActivationLinksTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ActivationLinks.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ActivationLinks.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ActivationLinks.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.cs new file mode 100644 index 000000000000..e20dac0f15b7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Activation Links model + public partial class ActivationLinks : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal + { + + /// Backing field for property. + private string _existingCloudAccountActivationLink; + + /// Existing Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ExistingCloudAccountActivationLink { get => this._existingCloudAccountActivationLink; } + + /// Internal Acessors for ExistingCloudAccountActivationLink + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal.ExistingCloudAccountActivationLink { get => this._existingCloudAccountActivationLink; set { {_existingCloudAccountActivationLink = value;} } } + + /// Internal Acessors for NewCloudAccountActivationLink + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinksInternal.NewCloudAccountActivationLink { get => this._newCloudAccountActivationLink; set { {_newCloudAccountActivationLink = value;} } } + + /// Backing field for property. + private string _newCloudAccountActivationLink; + + /// New Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NewCloudAccountActivationLink { get => this._newCloudAccountActivationLink; } + + /// Creates an new instance. + public ActivationLinks() + { + + } + } + /// Activation Links model + public partial interface IActivationLinks : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Existing Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Existing Cloud Account Activation Link", + SerializedName = @"existingCloudAccountActivationLink", + PossibleTypes = new [] { typeof(string) })] + string ExistingCloudAccountActivationLink { get; } + /// New Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"New Cloud Account Activation Link", + SerializedName = @"newCloudAccountActivationLink", + PossibleTypes = new [] { typeof(string) })] + string NewCloudAccountActivationLink { get; } + + } + /// Activation Links model + internal partial interface IActivationLinksInternal + + { + /// Existing Cloud Account Activation Link + string ExistingCloudAccountActivationLink { get; set; } + /// New Cloud Account Activation Link + string NewCloudAccountActivationLink { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.json.cs new file mode 100644 index 000000000000..63010e9997bb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ActivationLinks.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Activation Links model + public partial class ActivationLinks + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ActivationLinks(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_newCloudAccountActivationLink = If( json?.PropertyT("newCloudAccountActivationLink"), out var __jsonNewCloudAccountActivationLink) ? (string)__jsonNewCloudAccountActivationLink : (string)_newCloudAccountActivationLink;} + {_existingCloudAccountActivationLink = If( json?.PropertyT("existingCloudAccountActivationLink"), out var __jsonExistingCloudAccountActivationLink) ? (string)__jsonExistingCloudAccountActivationLink : (string)_existingCloudAccountActivationLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IActivationLinks FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ActivationLinks(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._newCloudAccountActivationLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._newCloudAccountActivationLink.ToString()) : null, "newCloudAccountActivationLink" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._existingCloudAccountActivationLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._existingCloudAccountActivationLink.ToString()) : null, "existingCloudAccountActivationLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.PowerShell.cs new file mode 100644 index 000000000000..ee7088a6b493 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Add/Remove (Virtual Machine) DbNode model + [System.ComponentModel.TypeConverter(typeof(AddRemoveDbNodeTypeConverter))] + public partial class AddRemoveDbNode + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AddRemoveDbNode(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNodeInternal)this).DbServer = (System.Collections.Generic.List) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNodeInternal)this).DbServer, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AddRemoveDbNode(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNodeInternal)this).DbServer = (System.Collections.Generic.List) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNodeInternal)this).DbServer, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AddRemoveDbNode(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AddRemoveDbNode(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Add/Remove (Virtual Machine) DbNode model + [System.ComponentModel.TypeConverter(typeof(AddRemoveDbNodeTypeConverter))] + public partial interface IAddRemoveDbNode + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.TypeConverter.cs new file mode 100644 index 000000000000..95037ba55597 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AddRemoveDbNodeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AddRemoveDbNode.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AddRemoveDbNode.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AddRemoveDbNode.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.cs new file mode 100644 index 000000000000..1afc0f17d3d5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Add/Remove (Virtual Machine) DbNode model + public partial class AddRemoveDbNode : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNodeInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _dbServer; + + /// Db servers ocids + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List DbServer { get => this._dbServer; set => this._dbServer = value; } + + /// Creates an new instance. + public AddRemoveDbNode() + { + + } + } + /// Add/Remove (Virtual Machine) DbNode model + public partial interface IAddRemoveDbNode : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Db servers ocids + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List DbServer { get; set; } + + } + /// Add/Remove (Virtual Machine) DbNode model + internal partial interface IAddRemoveDbNodeInternal + + { + /// Db servers ocids + System.Collections.Generic.List DbServer { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.json.cs new file mode 100644 index 000000000000..e8457adc2b02 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AddRemoveDbNode.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Add/Remove (Virtual Machine) DbNode model + public partial class AddRemoveDbNode + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AddRemoveDbNode(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbServer = If( json?.PropertyT("dbServers"), out var __jsonDbServers) ? If( __jsonDbServers as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _dbServer;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AddRemoveDbNode(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._dbServer) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._dbServer ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("dbServers",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.PowerShell.cs new file mode 100644 index 000000000000..1db8b8cbdc6b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [System.ComponentModel.TypeConverter(typeof(AllConnectionStringTypeTypeConverter))] + public partial class AllConnectionStringType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AllConnectionStringType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AllConnectionStringType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AllConnectionStringType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AllConnectionStringType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + [System.ComponentModel.TypeConverter(typeof(AllConnectionStringTypeTypeConverter))] + public partial interface IAllConnectionStringType + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.TypeConverter.cs new file mode 100644 index 000000000000..47a8eed0c004 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AllConnectionStringTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AllConnectionStringType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AllConnectionStringType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AllConnectionStringType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.cs new file mode 100644 index 000000000000..121ae24f41cb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class AllConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal + { + + /// Backing field for property. + private string _high; + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string High { get => this._high; set => this._high = value; } + + /// Backing field for property. + private string _low; + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Low { get => this._low; set => this._low = value; } + + /// Backing field for property. + private string _medium; + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Medium { get => this._medium; set => this._medium = value; } + + /// Creates an new instance. + public AllConnectionStringType() + { + + } + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + public partial interface IAllConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string Low { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string Medium { get; set; } + + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + internal partial interface IAllConnectionStringTypeInternal + + { + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string Low { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + string Medium { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.json.cs new file mode 100644 index 000000000000..2fa87d27b0c4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AllConnectionStringType.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class AllConnectionStringType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AllConnectionStringType(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_high = If( json?.PropertyT("high"), out var __jsonHigh) ? (string)__jsonHigh : (string)_high;} + {_low = If( json?.PropertyT("low"), out var __jsonLow) ? (string)__jsonLow : (string)_low;} + {_medium = If( json?.PropertyT("medium"), out var __jsonMedium) ? (string)__jsonMedium : (string)_medium;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AllConnectionStringType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._high)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._high.ToString()) : null, "high" ,container.Add ); + AddIf( null != (((object)this._low)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._low.ToString()) : null, "low" ,container.Add ); + AddIf( null != (((object)this._medium)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._medium.ToString()) : null, "medium" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Any.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.PowerShell.cs new file mode 100644 index 000000000000..e3001ba3be72 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Any(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Any(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Anything + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Any.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..140b6da093b3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Any.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Any.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Any.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.cs new file mode 100644 index 000000000000..703ba8974eba --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Anything + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Anything + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + + } + /// Anything + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Any.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..f1b10270ac40 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Any.json.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Anything + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.PowerShell.cs new file mode 100644 index 000000000000..76b3863c6e71 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Information about Oracle APEX Application Development. + [System.ComponentModel.TypeConverter(typeof(ApexDetailsTypeTypeConverter))] + public partial class ApexDetailsType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ApexDetailsType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).ApexVersion = (string) content.GetValueForProperty("ApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).ApexVersion, global::System.Convert.ToString); + } + if (content.Contains("OrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).OrdsVersion = (string) content.GetValueForProperty("OrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).OrdsVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ApexDetailsType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).ApexVersion = (string) content.GetValueForProperty("ApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).ApexVersion, global::System.Convert.ToString); + } + if (content.Contains("OrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).OrdsVersion = (string) content.GetValueForProperty("OrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)this).OrdsVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ApexDetailsType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ApexDetailsType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Information about Oracle APEX Application Development. + [System.ComponentModel.TypeConverter(typeof(ApexDetailsTypeTypeConverter))] + public partial interface IApexDetailsType + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.TypeConverter.cs new file mode 100644 index 000000000000..c1587ed951a9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ApexDetailsTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ApexDetailsType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ApexDetailsType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ApexDetailsType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.cs new file mode 100644 index 000000000000..70218398dc83 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Information about Oracle APEX Application Development. + public partial class ApexDetailsType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal + { + + /// Backing field for property. + private string _apexVersion; + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ApexVersion { get => this._apexVersion; set => this._apexVersion = value; } + + /// Backing field for property. + private string _ordsVersion; + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OrdsVersion { get => this._ordsVersion; set => this._ordsVersion = value; } + + /// Creates an new instance. + public ApexDetailsType() + { + + } + } + /// Information about Oracle APEX Application Development. + public partial interface IApexDetailsType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle APEX Application Development version.", + SerializedName = @"apexVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle REST Data Services (ORDS) version.", + SerializedName = @"ordsVersion", + PossibleTypes = new [] { typeof(string) })] + string OrdsVersion { get; set; } + + } + /// Information about Oracle APEX Application Development. + internal partial interface IApexDetailsTypeInternal + + { + /// The Oracle APEX Application Development version. + string ApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + string OrdsVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.json.cs new file mode 100644 index 000000000000..f1f233891183 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ApexDetailsType.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Information about Oracle APEX Application Development. + public partial class ApexDetailsType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ApexDetailsType(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_apexVersion = If( json?.PropertyT("apexVersion"), out var __jsonApexVersion) ? (string)__jsonApexVersion : (string)_apexVersion;} + {_ordsVersion = If( json?.PropertyT("ordsVersion"), out var __jsonOrdsVersion) ? (string)__jsonOrdsVersion : (string)_ordsVersion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ApexDetailsType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._apexVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._apexVersion.ToString()) : null, "apexVersion" ,container.Add ); + AddIf( null != (((object)this._ordsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ordsVersion.ToString()) : null, "ordsVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.PowerShell.cs new file mode 100644 index 000000000000..de4c1fc15620 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.PowerShell.cs @@ -0,0 +1,1108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseTypeConverter))] + public partial class AutonomousDatabase + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabase(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBasePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabase(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBasePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabase(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabase(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseTypeConverter))] + public partial interface IAutonomousDatabase + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.TypeConverter.cs new file mode 100644 index 000000000000..7e651c4fea69 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabase.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabase.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabase.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.cs new file mode 100644 index 000000000000..d4bf86b5d14f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.cs @@ -0,0 +1,2242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabase : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AdminPassword = value ?? null; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringLow = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllocatedStorageSizeInTb; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousMaintenanceScheduleType = value ?? null; } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AvailableUpgradeVersion; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).CharacterSet = value ?? null; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeModel = value ?? null; } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringDedicated = value ?? null; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringLow = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DataBaseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataBaseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataBaseType = value ?? null; } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DatabaseEdition = value ?? null; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DayOfWeekName = value ?? null; } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DbWorkload = value ?? null; } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).FailedDataRecoveryInSecond; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsRemoteDataGuardEnabled; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LicenseModel = value ?? null; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleState; } + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalDisasterRecoveryType; } + + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleState = value ?? null; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence = value ?? null; } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionString = value; } + + /// Internal Acessors for ConnectionStringAllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringAllConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDb = value; } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupSchedule = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbIds + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.PeerDbIds { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbIds; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbIds = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpoint = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisionableCpu + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperation = value; } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationDayOfWeek = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInTb = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name; } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OpenMode = value ?? null; } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).OperationsInsightsStatus; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbId = value ?? null; } + + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List PeerDbIds { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbIds; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PermissionLevel = value ?? null; } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointLabel = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties()); set => this._property = value; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).Role = value ?? null; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).ServiceConsoleUrl; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).SupportedRegionsToCloneTo; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).TimeReclamationOfFreeAutonomousDatabase; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).VnetId = value ?? null; } + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)Property).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabase() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// Autonomous Database resource model. + public partial interface IAutonomousDatabase : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current amount of storage in use for user and system data, in terabytes (TB).", + SerializedName = @"actualUsedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? ActualUsedDataStorageSizeInTb { get; } + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = true, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringHigh { get; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringLow { get; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringMedium { get; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of storage currently allocated for the database tables and billed for, rounded up.", + SerializedName = @"allocatedStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AllocatedStorageSizeInTb { get; } + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle APEX Application Development version.", + SerializedName = @"apexVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailApexVersion { get; } + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle REST Data Services (ORDS) version.", + SerializedName = @"ordsVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailOrdsVersion { get; } + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Autonomous Database ID", + SerializedName = @"autonomousDatabaseId", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.", + SerializedName = @"availableUpgradeVersions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List AvailableUpgradeVersion { get; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The character set for the autonomous database.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The compute model of the Autonomous Database.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ECPU", "OCPU")] + string ComputeModel { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"dedicated", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringDedicated { get; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringHigh { get; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringLow { get; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringMedium { get; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata.", + SerializedName = @"profiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType) })] + System.Collections.Generic.List ConnectionStringProfile { get; } + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Oracle Application Express (APEX) URL.", + SerializedName = @"apexUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlApexUrl { get; } + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Database Transforms for the Autonomous Database.", + SerializedName = @"databaseTransformsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlDatabaseTransformsUrl { get; } + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Graph Studio for the Autonomous Database.", + SerializedName = @"graphStudioUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlGraphStudioUrl { get; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database.", + SerializedName = @"machineLearningNotebookUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMachineLearningNotebookUrl { get; } + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the MongoDB API for the Autonomous Database.", + SerializedName = @"mongoDbUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMongoDbUrl { get; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database.", + SerializedName = @"ordsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlOrdsUrl { get; } + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Oracle SQL Developer Web URL.", + SerializedName = @"sqlDevWebUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlSqlDevWebUrl { get; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = false, + Description = @"Database type to be created.", + SerializedName = @"dataBaseType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Regular", "Clone")] + string DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of the Data Safe registration for this Autonomous Database.", + SerializedName = @"dataSafeStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Registering", "Registered", "Deregistering", "NotRegistered", "Failed")] + string DataSafeStatus { get; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; set; } + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates the number of seconds of data loss for a Data Guard failover.", + SerializedName = @"failedDataRecoveryInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? FailedDataRecoveryInSecond { get; } + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The area assigned to In-Memory tables in Autonomous Database.", + SerializedName = @"inMemoryAreaInGbs", + PossibleTypes = new [] { typeof(int) })] + int? InMemoryAreaInGb { get; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates if the Autonomous Database version is a preview version.", + SerializedName = @"isPreview", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreview { get; } + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = false, + Description = @"Specifies if the Autonomous Database preview version is being provisioned.", + SerializedName = @"isPreviewVersionWithServiceTermsAccepted", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates whether the Autonomous Database has Cross Region Data Guard enabled.", + SerializedName = @"isRemoteDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRemoteDataGuardEnabled { get; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LifecycleState { get; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"localDisasterRecoveryType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Adg", "BackupBased")] + string LocalDisasterRecoveryType { get; } + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover.", + SerializedName = @"lagTimeInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? LocalStandbyDbLagTimeInSecond { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbLifecycleDetail { get; } + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of the Autonomous Database.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LocalStandbyDbLifecycleState { get; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDataGuardRoleChanged { get; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of memory (in GBs) enabled per ECPU or OCPU.", + SerializedName = @"memoryPerOracleComputeUnitInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemoryPerOracleComputeUnitInGb { get; } + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The character set for the Autonomous Database.", + SerializedName = @"ncharacterSet", + PossibleTypes = new [] { typeof(string) })] + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when the next long-term backup would be created.", + SerializedName = @"nextLongTermBackupTimeStamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NextLongTermBackupTimeStamp { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Database ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of Operations Insights for this Autonomous Database.", + SerializedName = @"operationsInsightsStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Enabling", "Enabled", "Disabling", "NotEnabled", "FailedEnabling", "FailedDisabling")] + string OperationsInsightsStatus { get; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.", + SerializedName = @"peerDbIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PeerDbIds { get; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The private endpoint for the resource.", + SerializedName = @"privateEndpoint", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpoint { get; } + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The private endpoint Ip address for the resource.", + SerializedName = @"privateEndpointIp", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The resource's private endpoint label.", + SerializedName = @"privateEndpointLabel", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointLabel { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"An array of CPU values that an Autonomous Database can be scaled to.", + SerializedName = @"provisionableCpus", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List ProvisionableCpu { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Service Console for the Autonomous Database.", + SerializedName = @"serviceConsoleUrl", + PossibleTypes = new [] { typeof(string) })] + string ServiceConsoleUrl { get; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The SQL Web Developer URL for the Oracle Autonomous Database.", + SerializedName = @"sqlWebDeveloperUrl", + PossibleTypes = new [] { typeof(string) })] + string SqlWebDeveloperUrl { get; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.", + SerializedName = @"supportedRegionsToCloneTo", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List SupportedRegionsToCloneTo { get; } + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the database was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Autonomous Data Guard role was switched for the Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDataGuardRoleChanged { get; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Always Free database will be automatically deleted because of inactivity.", + SerializedName = @"timeDeletionOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeDeletionOfFreeAutonomousDatabase { get; } + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database.", + SerializedName = @"timeLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(string) })] + string TimeLocalDataGuardEnabled { get; } + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when maintenance will begin.", + SerializedName = @"timeMaintenanceBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceBegin { get; } + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when maintenance will end.", + SerializedName = @"timeMaintenanceEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceEnd { get; } + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of the last failover operation.", + SerializedName = @"timeOfLastFailover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastFailover { get; } + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when last refresh happened.", + SerializedName = @"timeOfLastRefresh", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefresh { get; } + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The refresh point timestamp (UTC).", + SerializedName = @"timeOfLastRefreshPoint", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefreshPoint { get; } + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of the last switchover operation for the Autonomous Database.", + SerializedName = @"timeOfLastSwitchover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastSwitchover { get; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Always Free database will be stopped because of inactivity.", + SerializedName = @"timeReclamationOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeReclamationOfFreeAutonomousDatabase { get; } + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The storage space consumed by Autonomous Database in GBs.", + SerializedName = @"usedDataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInGb { get; } + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of storage that has been used, in terabytes.", + SerializedName = @"usedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInTb { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List WhitelistedIP { get; set; } + + } + /// Autonomous Database resource model. + internal partial interface IAutonomousDatabaseInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + double? ActualUsedDataStorageSizeInTb { get; set; } + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string AllConnectionStringLow { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + string AllConnectionStringMedium { get; set; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + double? AllocatedStorageSizeInTb { get; set; } + /// Information about Oracle APEX Application Development. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType ApexDetail { get; set; } + /// The Oracle APEX Application Development version. + string ApexDetailApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + string ApexDetailOrdsVersion { get; set; } + /// Autonomous Database ID + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + System.Collections.Generic.List AvailableUpgradeVersion { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ECPU", "OCPU")] + string ComputeModel { get; set; } + /// The connection string used to connect to the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType ConnectionString { get; set; } + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType ConnectionStringAllConnectionString { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + string ConnectionStringDedicated { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + string ConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string ConnectionStringLow { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + string ConnectionStringMedium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + System.Collections.Generic.List ConnectionStringProfile { get; set; } + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType ConnectionUrl { get; set; } + /// Oracle Application Express (APEX) URL. + string ConnectionUrlApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + string ConnectionUrlDatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + string ConnectionUrlGraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + string ConnectionUrlMachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + string ConnectionUrlMongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + string ConnectionUrlOrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + string ConnectionUrlSqlDevWebUrl { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + System.Collections.Generic.List CustomerContact { get; set; } + /// Database type to be created. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Regular", "Clone")] + string DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Registering", "Registered", "Deregistering", "NotRegistered", "Failed")] + string DataSafeStatus { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The Autonomous Database workload type + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + int? FailedDataRecoveryInSecond { get; set; } + /// The area assigned to In-Memory tables in Autonomous Database. + int? InMemoryAreaInGb { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + bool? IsPreview { get; set; } + /// Specifies if the Autonomous Database preview version is being provisioned. + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + bool? IsRemoteDataGuardEnabled { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// Views lifecycleState + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LifecycleState { get; set; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Adg", "BackupBased")] + string LocalDisasterRecoveryType { get; set; } + /// Local Autonomous Disaster Recovery standby database details. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary LocalStandbyDb { get; set; } + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + int? LocalStandbyDbLagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + string LocalStandbyDbLifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LocalStandbyDbLifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + int? MemoryPerOracleComputeUnitInGb { get; set; } + /// The character set for the Autonomous Database. + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + global::System.DateTime? NextLongTermBackupTimeStamp { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Database ocid + string Ocid { get; set; } + /// Indicates the Autonomous Database mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Enabling", "Enabled", "Disabling", "NotEnabled", "FailedEnabling", "FailedDisabling")] + string OperationsInsightsStatus { get; set; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + string PeerDbId { get; set; } + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + System.Collections.Generic.List PeerDbIds { get; set; } + /// The Autonomous Database permission level. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// The private endpoint for the resource. + string PrivateEndpoint { get; set; } + /// The private endpoint Ip address for the resource. + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + string PrivateEndpointLabel { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties Property { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + System.Collections.Generic.List ProvisionableCpu { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + string ServiceConsoleUrl { get; set; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + string SqlWebDeveloperUrl { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + System.Collections.Generic.List SupportedRegionsToCloneTo { get; set; } + /// The date and time that the database was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + string TimeDeletionOfFreeAutonomousDatabase { get; set; } + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + string TimeLocalDataGuardEnabled { get; set; } + /// The date and time when maintenance will begin. + global::System.DateTime? TimeMaintenanceBegin { get; set; } + /// The date and time when maintenance will end. + global::System.DateTime? TimeMaintenanceEnd { get; set; } + /// The timestamp of the last failover operation. + string TimeOfLastFailover { get; set; } + /// The date and time when last refresh happened. + string TimeOfLastRefresh { get; set; } + /// The refresh point timestamp (UTC). + string TimeOfLastRefreshPoint { get; set; } + /// The timestamp of the last switchover operation for the Autonomous Database. + string TimeOfLastSwitchover { get; set; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + string TimeReclamationOfFreeAutonomousDatabase { get; set; } + /// The storage space consumed by Autonomous Database in GBs. + int? UsedDataStorageSizeInGb { get; set; } + /// The amount of storage that has been used, in terabytes. + int? UsedDataStorageSizeInTb { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + System.Collections.Generic.List WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.json.cs new file mode 100644 index 000000000000..5442a5d19e6a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabase.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabase + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabase(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabase(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.PowerShell.cs new file mode 100644 index 000000000000..a4d151eccbec --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.PowerShell.cs @@ -0,0 +1,372 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDatabaseBackup resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupTypeConverter))] + public partial class AutonomousDatabaseBackup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).BackupType = (string) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).BackupType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).BackupType = (string) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).BackupType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDatabaseBackup resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupTypeConverter))] + public partial interface IAutonomousDatabaseBackup + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.TypeConverter.cs new file mode 100644 index 000000000000..f32f7fc18b00 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackup.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.cs new file mode 100644 index 000000000000..7f4b4bd8c30b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource definition + public partial class AutonomousDatabaseBackup : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AutonomousDatabaseOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid; } + + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string BackupType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType; } + + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? DatabaseSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb; } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion; } + + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsAutomatic { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic; } + + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsRestorable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail; } + + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState; } + + /// Internal Acessors for AutonomousDatabaseOcid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.AutonomousDatabaseOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid = value; } + + /// Internal Acessors for BackupType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.BackupType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType = value; } + + /// Internal Acessors for DatabaseSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.DatabaseSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb = value; } + + /// Internal Acessors for DbVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion = value; } + + /// Internal Acessors for IsAutomatic + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.IsAutomatic { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic = value; } + + /// Internal Acessors for IsRestorable + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.IsRestorable { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.SizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb = value; } + + /// Internal Acessors for TimeAvailableTil + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.TimeAvailableTil { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil = value; } + + /// Internal Acessors for TimeEnded + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.TimeEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded = value; } + + /// Internal Acessors for TimeStarted + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupInternal.TimeStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? RetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).RetentionPeriodInDay = value ?? default(int); } + + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? SizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeAvailableTil { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil; } + + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded; } + + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public AutonomousDatabaseBackup() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// AutonomousDatabaseBackup resource definition + public partial interface IAutonomousDatabaseBackup : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Autonomous Database.", + SerializedName = @"autonomousDatabaseOcid", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseOcid { get; } + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of backup.", + SerializedName = @"backupType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Incremental", "Full", "LongTerm")] + string BackupType { get; } + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The size of the database in terabytes at the time the backup was taken.", + SerializedName = @"databaseSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DatabaseSizeInTb { get; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; } + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates whether the backup is user-initiated or automatic.", + SerializedName = @"isAutomatic", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutomatic { get; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates whether the backup can be used to restore the associated Autonomous Database.", + SerializedName = @"isRestorable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRestorable { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of the backup.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Active", "Deleting", "Failed", "Updating")] + string LifecycleState { get; } + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Autonomous Database backup.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The backup size in terabytes (TB).", + SerializedName = @"sizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? SizeInTb { get; } + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Timestamp until when the backup will be available.", + SerializedName = @"timeAvailableTil", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAvailableTil { get; } + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the backup completed.", + SerializedName = @"timeEnded", + PossibleTypes = new [] { typeof(string) })] + string TimeEnded { get; } + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the backup started.", + SerializedName = @"timeStarted", + PossibleTypes = new [] { typeof(string) })] + string TimeStarted { get; } + + } + /// AutonomousDatabaseBackup resource definition + internal partial interface IAutonomousDatabaseBackupInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// The OCID of the Autonomous Database. + string AutonomousDatabaseOcid { get; set; } + /// The type of backup. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Incremental", "Full", "LongTerm")] + string BackupType { get; set; } + /// The size of the database in terabytes at the time the backup was taken. + double? DatabaseSizeInTb { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The user-friendly name for the backup. The name does not have to be unique. + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + bool? IsAutomatic { get; set; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + bool? IsRestorable { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// The current state of the backup. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Active", "Deleting", "Failed", "Updating")] + string LifecycleState { get; set; } + /// The OCID of the Autonomous Database backup. + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties Property { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// Retention period, in days, for long-term backups. + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + double? SizeInTb { get; set; } + /// Timestamp until when the backup will be available. + global::System.DateTime? TimeAvailableTil { get; set; } + /// The date and time the backup completed. + string TimeEnded { get; set; } + /// The date and time the backup started. + string TimeStarted { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.json.cs new file mode 100644 index 000000000000..d374d55051e5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackup.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource definition + public partial class AutonomousDatabaseBackup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackup(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackup(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.PowerShell.cs new file mode 100644 index 000000000000..32a5be12f528 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a AutonomousDatabaseBackup list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupListResultTypeConverter))] + public partial class AutonomousDatabaseBackupListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a AutonomousDatabaseBackup list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupListResultTypeConverter))] + public partial interface IAutonomousDatabaseBackupListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.TypeConverter.cs new file mode 100644 index 000000000000..5abc42d3fb60 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.cs new file mode 100644 index 000000000000..a61985292263 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabaseBackup list operation. + public partial class AutonomousDatabaseBackupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The AutonomousDatabaseBackup items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AutonomousDatabaseBackupListResult() + { + + } + } + /// The response of a AutonomousDatabaseBackup list operation. + public partial interface IAutonomousDatabaseBackupListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabaseBackup items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The AutonomousDatabaseBackup items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a AutonomousDatabaseBackup list operation. + internal partial interface IAutonomousDatabaseBackupListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabaseBackup items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.json.cs new file mode 100644 index 000000000000..56cf8e958ba1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupListResult.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabaseBackup list operation. + public partial class AutonomousDatabaseBackupListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.PowerShell.cs new file mode 100644 index 000000000000..b650db2dc270 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.PowerShell.cs @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDatabaseBackup resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupPropertiesTypeConverter))] + public partial class AutonomousDatabaseBackupProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType = (string) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType = (string) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDatabaseBackup resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseBackupProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.TypeConverter.cs new file mode 100644 index 000000000000..4081153d277b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.cs new file mode 100644 index 000000000000..1762c486b859 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.cs @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource model + public partial class AutonomousDatabaseBackupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal + { + + /// Backing field for property. + private string _autonomousDatabaseOcid; + + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string AutonomousDatabaseOcid { get => this._autonomousDatabaseOcid; } + + /// Backing field for property. + private string _backupType; + + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string BackupType { get => this._backupType; } + + /// Backing field for property. + private double? _databaseSizeInTb; + + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? DatabaseSizeInTb { get => this._databaseSizeInTb; } + + /// Backing field for property. + private string _dbVersion; + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbVersion { get => this._dbVersion; } + + /// Backing field for property. + private string _displayName; + + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private bool? _isAutomatic; + + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsAutomatic { get => this._isAutomatic; } + + /// Backing field for property. + private bool? _isRestorable; + + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsRestorable { get => this._isRestorable; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private string _lifecycleState; + + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Internal Acessors for AutonomousDatabaseOcid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.AutonomousDatabaseOcid { get => this._autonomousDatabaseOcid; set { {_autonomousDatabaseOcid = value;} } } + + /// Internal Acessors for BackupType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.BackupType { get => this._backupType; set { {_backupType = value;} } } + + /// Internal Acessors for DatabaseSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.DatabaseSizeInTb { get => this._databaseSizeInTb; set { {_databaseSizeInTb = value;} } } + + /// Internal Acessors for DbVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.DbVersion { get => this._dbVersion; set { {_dbVersion = value;} } } + + /// Internal Acessors for IsAutomatic + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.IsAutomatic { get => this._isAutomatic; set { {_isAutomatic = value;} } } + + /// Internal Acessors for IsRestorable + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.IsRestorable { get => this._isRestorable; set { {_isRestorable = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.SizeInTb { get => this._sizeInTb; set { {_sizeInTb = value;} } } + + /// Internal Acessors for TimeAvailableTil + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.TimeAvailableTil { get => this._timeAvailableTil; set { {_timeAvailableTil = value;} } } + + /// Internal Acessors for TimeEnded + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.TimeEnded { get => this._timeEnded; set { {_timeEnded = value;} } } + + /// Internal Acessors for TimeStarted + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupPropertiesInternal.TimeStarted { get => this._timeStarted; set { {_timeStarted = value;} } } + + /// Backing field for property. + private string _ocid; + + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private int? _retentionPeriodInDay; + + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? RetentionPeriodInDay { get => this._retentionPeriodInDay; set => this._retentionPeriodInDay = value; } + + /// Backing field for property. + private double? _sizeInTb; + + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? SizeInTb { get => this._sizeInTb; } + + /// Backing field for property. + private global::System.DateTime? _timeAvailableTil; + + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeAvailableTil { get => this._timeAvailableTil; } + + /// Backing field for property. + private string _timeEnded; + + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeEnded { get => this._timeEnded; } + + /// Backing field for property. + private string _timeStarted; + + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeStarted { get => this._timeStarted; } + + /// Creates an new instance. + public AutonomousDatabaseBackupProperties() + { + + } + } + /// AutonomousDatabaseBackup resource model + public partial interface IAutonomousDatabaseBackupProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Autonomous Database.", + SerializedName = @"autonomousDatabaseOcid", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseOcid { get; } + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of backup.", + SerializedName = @"backupType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Incremental", "Full", "LongTerm")] + string BackupType { get; } + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The size of the database in terabytes at the time the backup was taken.", + SerializedName = @"databaseSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DatabaseSizeInTb { get; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; } + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates whether the backup is user-initiated or automatic.", + SerializedName = @"isAutomatic", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutomatic { get; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates whether the backup can be used to restore the associated Autonomous Database.", + SerializedName = @"isRestorable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRestorable { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of the backup.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Active", "Deleting", "Failed", "Updating")] + string LifecycleState { get; } + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Autonomous Database backup.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The backup size in terabytes (TB).", + SerializedName = @"sizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? SizeInTb { get; } + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Timestamp until when the backup will be available.", + SerializedName = @"timeAvailableTil", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAvailableTil { get; } + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the backup completed.", + SerializedName = @"timeEnded", + PossibleTypes = new [] { typeof(string) })] + string TimeEnded { get; } + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the backup started.", + SerializedName = @"timeStarted", + PossibleTypes = new [] { typeof(string) })] + string TimeStarted { get; } + + } + /// AutonomousDatabaseBackup resource model + internal partial interface IAutonomousDatabaseBackupPropertiesInternal + + { + /// The OCID of the Autonomous Database. + string AutonomousDatabaseOcid { get; set; } + /// The type of backup. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Incremental", "Full", "LongTerm")] + string BackupType { get; set; } + /// The size of the database in terabytes at the time the backup was taken. + double? DatabaseSizeInTb { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The user-friendly name for the backup. The name does not have to be unique. + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + bool? IsAutomatic { get; set; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + bool? IsRestorable { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// The current state of the backup. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Active", "Deleting", "Failed", "Updating")] + string LifecycleState { get; set; } + /// The OCID of the Autonomous Database backup. + string Ocid { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// Retention period, in days, for long-term backups. + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + double? SizeInTb { get; set; } + /// Timestamp until when the backup will be available. + global::System.DateTime? TimeAvailableTil { get; set; } + /// The date and time the backup completed. + string TimeEnded { get; set; } + /// The date and time the backup started. + string TimeStarted { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.json.cs new file mode 100644 index 000000000000..ca8aac0a6115 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupProperties.json.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource model + public partial class AutonomousDatabaseBackupProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_autonomousDatabaseOcid = If( json?.PropertyT("autonomousDatabaseOcid"), out var __jsonAutonomousDatabaseOcid) ? (string)__jsonAutonomousDatabaseOcid : (string)_autonomousDatabaseOcid;} + {_databaseSizeInTb = If( json?.PropertyT("databaseSizeInTbs"), out var __jsonDatabaseSizeInTbs) ? (double?)__jsonDatabaseSizeInTbs : _databaseSizeInTb;} + {_dbVersion = If( json?.PropertyT("dbVersion"), out var __jsonDbVersion) ? (string)__jsonDbVersion : (string)_dbVersion;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_isAutomatic = If( json?.PropertyT("isAutomatic"), out var __jsonIsAutomatic) ? (bool?)__jsonIsAutomatic : _isAutomatic;} + {_isRestorable = If( json?.PropertyT("isRestorable"), out var __jsonIsRestorable) ? (bool?)__jsonIsRestorable : _isRestorable;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_retentionPeriodInDay = If( json?.PropertyT("retentionPeriodInDays"), out var __jsonRetentionPeriodInDays) ? (int?)__jsonRetentionPeriodInDays : _retentionPeriodInDay;} + {_sizeInTb = If( json?.PropertyT("sizeInTbs"), out var __jsonSizeInTbs) ? (double?)__jsonSizeInTbs : _sizeInTb;} + {_timeAvailableTil = If( json?.PropertyT("timeAvailableTil"), out var __jsonTimeAvailableTil) ? global::System.DateTime.TryParse((string)__jsonTimeAvailableTil, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeAvailableTilValue) ? __jsonTimeAvailableTilValue : _timeAvailableTil : _timeAvailableTil;} + {_timeStarted = If( json?.PropertyT("timeStarted"), out var __jsonTimeStarted) ? (string)__jsonTimeStarted : (string)_timeStarted;} + {_timeEnded = If( json?.PropertyT("timeEnded"), out var __jsonTimeEnded) ? (string)__jsonTimeEnded : (string)_timeEnded;} + {_backupType = If( json?.PropertyT("backupType"), out var __jsonBackupType) ? (string)__jsonBackupType : (string)_backupType;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._autonomousDatabaseOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._autonomousDatabaseOcid.ToString()) : null, "autonomousDatabaseOcid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._databaseSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._databaseSizeInTb) : null, "databaseSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._dbVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbVersion.ToString()) : null, "dbVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isAutomatic ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isAutomatic) : null, "isAutomatic" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isRestorable ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isRestorable) : null, "isRestorable" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + AddIf( null != this._retentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._retentionPeriodInDay) : null, "retentionPeriodInDays" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._sizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._sizeInTb) : null, "sizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeAvailableTil ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeAvailableTil?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeAvailableTil" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeStarted)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeStarted.ToString()) : null, "timeStarted" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeEnded)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeEnded.ToString()) : null, "timeEnded" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._backupType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._backupType.ToString()) : null, "backupType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.PowerShell.cs new file mode 100644 index 000000000000..b235f1869e9d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The type used for update operations of the AutonomousDatabaseBackup. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupUpdateTypeConverter))] + public partial class AutonomousDatabaseBackupUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the AutonomousDatabaseBackup. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupUpdateTypeConverter))] + public partial interface IAutonomousDatabaseBackupUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.TypeConverter.cs new file mode 100644 index 000000000000..b17880f8cc24 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.cs new file mode 100644 index 000000000000..fd8cafd63b8e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the AutonomousDatabaseBackup. + public partial class AutonomousDatabaseBackupUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal + { + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties _property; + + /// The updatable properties of the AutonomousDatabaseBackup. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupUpdateProperties()); set => this._property = value; } + + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? RetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdatePropertiesInternal)Property).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdatePropertiesInternal)Property).RetentionPeriodInDay = value ?? default(int); } + + /// Creates an new instance. + public AutonomousDatabaseBackupUpdate() + { + + } + } + /// The type used for update operations of the AutonomousDatabaseBackup. + public partial interface IAutonomousDatabaseBackupUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + + } + /// The type used for update operations of the AutonomousDatabaseBackup. + internal partial interface IAutonomousDatabaseBackupUpdateInternal + + { + /// The updatable properties of the AutonomousDatabaseBackup. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties Property { get; set; } + /// Retention period, in days, for long-term backups. + int? RetentionPeriodInDay { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.json.cs new file mode 100644 index 000000000000..199a6abcb7bc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdate.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the AutonomousDatabaseBackup. + public partial class AutonomousDatabaseBackupUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupUpdateProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..c05e642a49a2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.PowerShell.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The updatable properties of the AutonomousDatabaseBackup. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupUpdatePropertiesTypeConverter))] + public partial class AutonomousDatabaseBackupUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdatePropertiesInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdatePropertiesInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdatePropertiesInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdatePropertiesInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the AutonomousDatabaseBackup. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupUpdatePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseBackupUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..300b230ed9fc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.cs new file mode 100644 index 000000000000..ce696658dc25 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the AutonomousDatabaseBackup. + public partial class AutonomousDatabaseBackupUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdatePropertiesInternal + { + + /// Backing field for property. + private int? _retentionPeriodInDay; + + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? RetentionPeriodInDay { get => this._retentionPeriodInDay; set => this._retentionPeriodInDay = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseBackupUpdateProperties() + { + + } + } + /// The updatable properties of the AutonomousDatabaseBackup. + public partial interface IAutonomousDatabaseBackupUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Retention period, in days, for long-term backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + + } + /// The updatable properties of the AutonomousDatabaseBackup. + internal partial interface IAutonomousDatabaseBackupUpdatePropertiesInternal + + { + /// Retention period, in days, for long-term backups. + int? RetentionPeriodInDay { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.json.cs new file mode 100644 index 000000000000..0927a759ce5d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBackupUpdateProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the AutonomousDatabaseBackup. + public partial class AutonomousDatabaseBackupUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_retentionPeriodInDay = If( json?.PropertyT("retentionPeriodInDays"), out var __jsonRetentionPeriodInDays) ? (int?)__jsonRetentionPeriodInDays : _retentionPeriodInDay;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._retentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._retentionPeriodInDay) : null, "retentionPeriodInDays" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.PowerShell.cs new file mode 100644 index 000000000000..803c4680f759 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.PowerShell.cs @@ -0,0 +1,1004 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Autonomous Database base resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBasePropertiesTypeConverter))] + public partial class AutonomousDatabaseBaseProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBaseProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBaseProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBaseProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBaseProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Autonomous Database base resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBasePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseBaseProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.TypeConverter.cs new file mode 100644 index 000000000000..a518b1db512e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBasePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBaseProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBaseProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBaseProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.cs new file mode 100644 index 000000000000..1c7a28713fc6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.cs @@ -0,0 +1,2398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database base resource model. + public partial class AutonomousDatabaseBaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal + { + + /// Backing field for property. + private double? _actualUsedDataStorageSizeInTb; + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? ActualUsedDataStorageSizeInTb { get => this._actualUsedDataStorageSizeInTb; } + + /// Backing field for property. + private System.Security.SecureString _adminPassword; + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Security.SecureString AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringLow = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringMedium = value ?? null; } + + /// Backing field for property. + private double? _allocatedStorageSizeInTb; + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? AllocatedStorageSizeInTb { get => this._allocatedStorageSizeInTb; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType _apexDetail; + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType ApexDetail { get => (this._apexDetail = this._apexDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsType()); } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)ApexDetail).ApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)ApexDetail).ApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)ApexDetail).OrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsTypeInternal)ApexDetail).OrdsVersion = value ?? null; } + + /// Backing field for property. + private string _autonomousDatabaseId; + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string AutonomousDatabaseId { get => this._autonomousDatabaseId; set => this._autonomousDatabaseId = value; } + + /// Backing field for property. + private string _autonomousMaintenanceScheduleType; + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string AutonomousMaintenanceScheduleType { get => this._autonomousMaintenanceScheduleType; set => this._autonomousMaintenanceScheduleType = value; } + + /// Backing field for property. + private System.Collections.Generic.List _availableUpgradeVersion; + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List AvailableUpgradeVersion { get => this._availableUpgradeVersion; } + + /// Backing field for property. + private int? _backupRetentionPeriodInDay; + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? BackupRetentionPeriodInDay { get => this._backupRetentionPeriodInDay; set => this._backupRetentionPeriodInDay = value; } + + /// Backing field for property. + private string _characterSet; + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CharacterSet { get => this._characterSet; set => this._characterSet = value; } + + /// Backing field for property. + private float? _computeCount; + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public float? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private string _computeModel; + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ComputeModel { get => this._computeModel; set => this._computeModel = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType _connectionString; + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType ConnectionString { get => (this._connectionString = this._connectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringType()); } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Dedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Dedicated = value ?? null; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).High; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).High = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Low; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Low = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Medium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Medium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Profile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).Profile = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType _connectionUrl; + + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType ConnectionUrl { get => (this._connectionUrl = this._connectionUrl ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlType()); } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).ApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).ApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).DatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).DatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).GraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).GraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).MachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).MachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).MongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).MongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).OrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).OrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).SqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)ConnectionUrl).SqlDevWebUrl = value ?? null; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private System.Collections.Generic.List _customerContact; + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private string _dataBaseType; + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DataBaseType { get => this._dataBaseType; set => this._dataBaseType = value; } + + /// Backing field for property. + private string _dataSafeStatus; + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DataSafeStatus { get => this._dataSafeStatus; } + + /// Backing field for property. + private int? _dataStorageSizeInGb; + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DataStorageSizeInGb { get => this._dataStorageSizeInGb; set => this._dataStorageSizeInGb = value; } + + /// Backing field for property. + private int? _dataStorageSizeInTb; + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private string _databaseEdition; + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DatabaseEdition { get => this._databaseEdition; set => this._databaseEdition = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeekName = value ?? null; } + + /// Backing field for property. + private string _dbVersion; + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbVersion { get => this._dbVersion; set => this._dbVersion = value; } + + /// Backing field for property. + private string _dbWorkload; + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbWorkload { get => this._dbWorkload; set => this._dbWorkload = value; } + + /// Backing field for property. + private string _displayName; + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private int? _failedDataRecoveryInSecond; + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? FailedDataRecoveryInSecond { get => this._failedDataRecoveryInSecond; } + + /// Backing field for property. + private int? _inMemoryAreaInGb; + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? InMemoryAreaInGb { get => this._inMemoryAreaInGb; } + + /// Backing field for property. + private bool? _isAutoScalingEnabled; + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsAutoScalingEnabled { get => this._isAutoScalingEnabled; set => this._isAutoScalingEnabled = value; } + + /// Backing field for property. + private bool? _isAutoScalingForStorageEnabled; + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsAutoScalingForStorageEnabled { get => this._isAutoScalingForStorageEnabled; set => this._isAutoScalingForStorageEnabled = value; } + + /// Backing field for property. + private bool? _isLocalDataGuardEnabled; + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsLocalDataGuardEnabled { get => this._isLocalDataGuardEnabled; set => this._isLocalDataGuardEnabled = value; } + + /// Backing field for property. + private bool? _isMtlsConnectionRequired; + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsMtlsConnectionRequired { get => this._isMtlsConnectionRequired; set => this._isMtlsConnectionRequired = value; } + + /// Backing field for property. + private bool? _isPreview; + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsPreview { get => this._isPreview; } + + /// + /// Backing field for property. + /// + private bool? _isPreviewVersionWithServiceTermsAccepted; + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => this._isPreviewVersionWithServiceTermsAccepted; set => this._isPreviewVersionWithServiceTermsAccepted = value; } + + /// Backing field for property. + private bool? _isRemoteDataGuardEnabled; + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsRemoteDataGuardEnabled { get => this._isRemoteDataGuardEnabled; } + + /// Backing field for property. + private string _licenseModel; + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private string _lifecycleState; + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private int? _localAdgAutoFailoverMaxDataLossLimit; + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => this._localAdgAutoFailoverMaxDataLossLimit; set => this._localAdgAutoFailoverMaxDataLossLimit = value; } + + /// Backing field for property. + private string _localDisasterRecoveryType; + + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LocalDisasterRecoveryType { get => this._localDisasterRecoveryType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary _localStandbyDb; + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => (this._localStandbyDb = this._localStandbyDb ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummary()); } + + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleState = value ?? null; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails _longTermBackupSchedule; + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails()); set => this._longTermBackupSchedule = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence = value ?? null; } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private int? _memoryPerOracleComputeUnitInGb; + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MemoryPerOracleComputeUnitInGb { get => this._memoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => this._actualUsedDataStorageSizeInTb; set { {_actualUsedDataStorageSizeInTb = value;} } } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => this._allocatedStorageSizeInTb; set { {_allocatedStorageSizeInTb = value;} } } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => (this._apexDetail = this._apexDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsType()); set { {_apexDetail = value;} } } + + /// Internal Acessors for AvailableUpgradeVersion + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => this._availableUpgradeVersion; set { {_availableUpgradeVersion = value;} } } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => (this._connectionString = this._connectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringType()); set { {_connectionString = value;} } } + + /// Internal Acessors for ConnectionStringAllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)ConnectionString).AllConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => (this._connectionUrl = this._connectionUrl ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlType()); set { {_connectionUrl = value;} } } + + /// Internal Acessors for DataSafeStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => this._dataSafeStatus; set { {_dataSafeStatus = value;} } } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => this._failedDataRecoveryInSecond; set { {_failedDataRecoveryInSecond = value;} } } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => this._inMemoryAreaInGb; set { {_inMemoryAreaInGb = value;} } } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => this._isPreview; set { {_isPreview = value;} } } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => this._isRemoteDataGuardEnabled; set { {_isRemoteDataGuardEnabled = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for LocalDisasterRecoveryType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => this._localDisasterRecoveryType; set { {_localDisasterRecoveryType = value;} } } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => (this._localStandbyDb = this._localStandbyDb ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummary()); set { {_localStandbyDb = value;} } } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails()); set { {_longTermBackupSchedule = value;} } } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => this._memoryPerOracleComputeUnitInGb; set { {_memoryPerOracleComputeUnitInGb = value;} } } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => this._nextLongTermBackupTimeStamp; set { {_nextLongTermBackupTimeStamp = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for OperationsInsightsStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => this._operationsInsightsStatus; set { {_operationsInsightsStatus = value;} } } + + /// Internal Acessors for PeerDbIds + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.PeerDbIds { get => this._peerDbIds; set { {_peerDbIds = value;} } } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => this._privateEndpoint; set { {_privateEndpoint = value;} } } + + /// Internal Acessors for ProvisionableCpu + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => this._provisionableCpu; set { {_provisionableCpu = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsType()); set { {_scheduledOperation = value;} } } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeek = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => this._serviceConsoleUrl; set { {_serviceConsoleUrl = value;} } } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => this._sqlWebDeveloperUrl; set { {_sqlWebDeveloperUrl = value;} } } + + /// Internal Acessors for SupportedRegionsToCloneTo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => this._supportedRegionsToCloneTo; set { {_supportedRegionsToCloneTo = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => this._timeDataGuardRoleChanged; set { {_timeDataGuardRoleChanged = value;} } } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => this._timeDeletionOfFreeAutonomousDatabase; set { {_timeDeletionOfFreeAutonomousDatabase = value;} } } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => this._timeLocalDataGuardEnabled; set { {_timeLocalDataGuardEnabled = value;} } } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => this._timeMaintenanceBegin; set { {_timeMaintenanceBegin = value;} } } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => this._timeMaintenanceEnd; set { {_timeMaintenanceEnd = value;} } } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => this._timeOfLastFailover; set { {_timeOfLastFailover = value;} } } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => this._timeOfLastRefresh; set { {_timeOfLastRefresh = value;} } } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => this._timeOfLastRefreshPoint; set { {_timeOfLastRefreshPoint = value;} } } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => this._timeOfLastSwitchover; set { {_timeOfLastSwitchover = value;} } } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => this._timeReclamationOfFreeAutonomousDatabase; set { {_timeReclamationOfFreeAutonomousDatabase = value;} } } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => this._usedDataStorageSizeInGb; set { {_usedDataStorageSizeInGb = value;} } } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => this._usedDataStorageSizeInTb; set { {_usedDataStorageSizeInTb = value;} } } + + /// Backing field for property. + private string _ncharacterSet; + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NcharacterSet { get => this._ncharacterSet; set => this._ncharacterSet = value; } + + /// Backing field for property. + private global::System.DateTime? _nextLongTermBackupTimeStamp; + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => this._nextLongTermBackupTimeStamp; } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _openMode; + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OpenMode { get => this._openMode; set => this._openMode = value; } + + /// Backing field for property. + private string _operationsInsightsStatus; + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OperationsInsightsStatus { get => this._operationsInsightsStatus; } + + /// Backing field for property. + private string _peerDbId; + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PeerDbId { get => this._peerDbId; set => this._peerDbId = value; } + + /// Backing field for property. + private System.Collections.Generic.List _peerDbIds; + + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List PeerDbIds { get => this._peerDbIds; } + + /// Backing field for property. + private string _permissionLevel; + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PermissionLevel { get => this._permissionLevel; set => this._permissionLevel = value; } + + /// Backing field for property. + private string _privateEndpoint; + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PrivateEndpoint { get => this._privateEndpoint; } + + /// Backing field for property. + private string _privateEndpointIP; + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PrivateEndpointIP { get => this._privateEndpointIP; set => this._privateEndpointIP = value; } + + /// Backing field for property. + private string _privateEndpointLabel; + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PrivateEndpointLabel { get => this._privateEndpointLabel; set => this._privateEndpointLabel = value; } + + /// Backing field for property. + private System.Collections.Generic.List _provisionableCpu; + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List ProvisionableCpu { get => this._provisionableCpu; } + + /// Backing field for property. + private string _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _role; + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Role { get => this._role; set => this._role = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType _scheduledOperation; + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsType()); set => this._scheduledOperation = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStopTime = value ?? null; } + + /// Backing field for property. + private string _serviceConsoleUrl; + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ServiceConsoleUrl { get => this._serviceConsoleUrl; } + + /// Backing field for property. + private string _sqlWebDeveloperUrl; + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SqlWebDeveloperUrl { get => this._sqlWebDeveloperUrl; } + + /// Backing field for property. + private string _subnetId; + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private System.Collections.Generic.List _supportedRegionsToCloneTo; + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List SupportedRegionsToCloneTo { get => this._supportedRegionsToCloneTo; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private string _timeDataGuardRoleChanged; + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeDataGuardRoleChanged { get => this._timeDataGuardRoleChanged; } + + /// Backing field for property. + private string _timeDeletionOfFreeAutonomousDatabase; + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeDeletionOfFreeAutonomousDatabase { get => this._timeDeletionOfFreeAutonomousDatabase; } + + /// Backing field for property. + private string _timeLocalDataGuardEnabled; + + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeLocalDataGuardEnabled { get => this._timeLocalDataGuardEnabled; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceBegin; + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceBegin { get => this._timeMaintenanceBegin; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceEnd; + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceEnd { get => this._timeMaintenanceEnd; } + + /// Backing field for property. + private string _timeOfLastFailover; + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeOfLastFailover { get => this._timeOfLastFailover; } + + /// Backing field for property. + private string _timeOfLastRefresh; + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeOfLastRefresh { get => this._timeOfLastRefresh; } + + /// Backing field for property. + private string _timeOfLastRefreshPoint; + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeOfLastRefreshPoint { get => this._timeOfLastRefreshPoint; } + + /// Backing field for property. + private string _timeOfLastSwitchover; + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeOfLastSwitchover { get => this._timeOfLastSwitchover; } + + /// + /// Backing field for property. + /// + private string _timeReclamationOfFreeAutonomousDatabase; + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeReclamationOfFreeAutonomousDatabase { get => this._timeReclamationOfFreeAutonomousDatabase; } + + /// Backing field for property. + private int? _usedDataStorageSizeInGb; + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? UsedDataStorageSizeInGb { get => this._usedDataStorageSizeInGb; } + + /// Backing field for property. + private int? _usedDataStorageSizeInTb; + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? UsedDataStorageSizeInTb { get => this._usedDataStorageSizeInTb; } + + /// Backing field for property. + private string _vnetId; + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string VnetId { get => this._vnetId; set => this._vnetId = value; } + + /// Backing field for property. + private System.Collections.Generic.List _whitelistedIP; + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List WhitelistedIP { get => this._whitelistedIP; set => this._whitelistedIP = value; } + + /// Creates an new instance. + public AutonomousDatabaseBaseProperties() + { + + } + } + /// Autonomous Database base resource model. + public partial interface IAutonomousDatabaseBaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current amount of storage in use for user and system data, in terabytes (TB).", + SerializedName = @"actualUsedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? ActualUsedDataStorageSizeInTb { get; } + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = true, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringHigh { get; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringLow { get; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringMedium { get; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of storage currently allocated for the database tables and billed for, rounded up.", + SerializedName = @"allocatedStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AllocatedStorageSizeInTb { get; } + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle APEX Application Development version.", + SerializedName = @"apexVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailApexVersion { get; } + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle REST Data Services (ORDS) version.", + SerializedName = @"ordsVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailOrdsVersion { get; } + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Autonomous Database ID", + SerializedName = @"autonomousDatabaseId", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.", + SerializedName = @"availableUpgradeVersions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List AvailableUpgradeVersion { get; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The character set for the autonomous database.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The compute model of the Autonomous Database.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ECPU", "OCPU")] + string ComputeModel { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"dedicated", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringDedicated { get; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringHigh { get; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringLow { get; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringMedium { get; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata.", + SerializedName = @"profiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType) })] + System.Collections.Generic.List ConnectionStringProfile { get; } + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Oracle Application Express (APEX) URL.", + SerializedName = @"apexUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlApexUrl { get; } + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Database Transforms for the Autonomous Database.", + SerializedName = @"databaseTransformsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlDatabaseTransformsUrl { get; } + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Graph Studio for the Autonomous Database.", + SerializedName = @"graphStudioUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlGraphStudioUrl { get; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database.", + SerializedName = @"machineLearningNotebookUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMachineLearningNotebookUrl { get; } + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the MongoDB API for the Autonomous Database.", + SerializedName = @"mongoDbUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMongoDbUrl { get; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database.", + SerializedName = @"ordsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlOrdsUrl { get; } + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Oracle SQL Developer Web URL.", + SerializedName = @"sqlDevWebUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlSqlDevWebUrl { get; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = false, + Create = true, + Update = false, + Description = @"Database type to be created.", + SerializedName = @"dataBaseType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Regular", "Clone")] + string DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of the Data Safe registration for this Autonomous Database.", + SerializedName = @"dataSafeStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Registering", "Registered", "Deregistering", "NotRegistered", "Failed")] + string DataSafeStatus { get; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; set; } + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates the number of seconds of data loss for a Data Guard failover.", + SerializedName = @"failedDataRecoveryInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? FailedDataRecoveryInSecond { get; } + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The area assigned to In-Memory tables in Autonomous Database.", + SerializedName = @"inMemoryAreaInGbs", + PossibleTypes = new [] { typeof(int) })] + int? InMemoryAreaInGb { get; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates if the Autonomous Database version is a preview version.", + SerializedName = @"isPreview", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreview { get; } + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = false, + Description = @"Specifies if the Autonomous Database preview version is being provisioned.", + SerializedName = @"isPreviewVersionWithServiceTermsAccepted", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates whether the Autonomous Database has Cross Region Data Guard enabled.", + SerializedName = @"isRemoteDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRemoteDataGuardEnabled { get; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LifecycleState { get; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"localDisasterRecoveryType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Adg", "BackupBased")] + string LocalDisasterRecoveryType { get; } + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover.", + SerializedName = @"lagTimeInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? LocalStandbyDbLagTimeInSecond { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbLifecycleDetail { get; } + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of the Autonomous Database.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LocalStandbyDbLifecycleState { get; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDataGuardRoleChanged { get; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of memory (in GBs) enabled per ECPU or OCPU.", + SerializedName = @"memoryPerOracleComputeUnitInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemoryPerOracleComputeUnitInGb { get; } + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The character set for the Autonomous Database.", + SerializedName = @"ncharacterSet", + PossibleTypes = new [] { typeof(string) })] + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when the next long-term backup would be created.", + SerializedName = @"nextLongTermBackupTimeStamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NextLongTermBackupTimeStamp { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Database ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Status of Operations Insights for this Autonomous Database.", + SerializedName = @"operationsInsightsStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Enabling", "Enabled", "Disabling", "NotEnabled", "FailedEnabling", "FailedDisabling")] + string OperationsInsightsStatus { get; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs.", + SerializedName = @"peerDbIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List PeerDbIds { get; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The private endpoint for the resource.", + SerializedName = @"privateEndpoint", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpoint { get; } + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The private endpoint Ip address for the resource.", + SerializedName = @"privateEndpointIp", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The resource's private endpoint label.", + SerializedName = @"privateEndpointLabel", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointLabel { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"An array of CPU values that an Autonomous Database can be scaled to.", + SerializedName = @"provisionableCpus", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List ProvisionableCpu { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The URL of the Service Console for the Autonomous Database.", + SerializedName = @"serviceConsoleUrl", + PossibleTypes = new [] { typeof(string) })] + string ServiceConsoleUrl { get; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The SQL Web Developer URL for the Oracle Autonomous Database.", + SerializedName = @"sqlWebDeveloperUrl", + PossibleTypes = new [] { typeof(string) })] + string SqlWebDeveloperUrl { get; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.", + SerializedName = @"supportedRegionsToCloneTo", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List SupportedRegionsToCloneTo { get; } + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the database was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Autonomous Data Guard role was switched for the Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDataGuardRoleChanged { get; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Always Free database will be automatically deleted because of inactivity.", + SerializedName = @"timeDeletionOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeDeletionOfFreeAutonomousDatabase { get; } + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database.", + SerializedName = @"timeLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(string) })] + string TimeLocalDataGuardEnabled { get; } + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when maintenance will begin.", + SerializedName = @"timeMaintenanceBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceBegin { get; } + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when maintenance will end.", + SerializedName = @"timeMaintenanceEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceEnd { get; } + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of the last failover operation.", + SerializedName = @"timeOfLastFailover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastFailover { get; } + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when last refresh happened.", + SerializedName = @"timeOfLastRefresh", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefresh { get; } + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The refresh point timestamp (UTC).", + SerializedName = @"timeOfLastRefreshPoint", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefreshPoint { get; } + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of the last switchover operation for the Autonomous Database.", + SerializedName = @"timeOfLastSwitchover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastSwitchover { get; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the Always Free database will be stopped because of inactivity.", + SerializedName = @"timeReclamationOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeReclamationOfFreeAutonomousDatabase { get; } + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The storage space consumed by Autonomous Database in GBs.", + SerializedName = @"usedDataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInGb { get; } + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The amount of storage that has been used, in terabytes.", + SerializedName = @"usedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInTb { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List WhitelistedIP { get; set; } + + } + /// Autonomous Database base resource model. + internal partial interface IAutonomousDatabaseBasePropertiesInternal + + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + double? ActualUsedDataStorageSizeInTb { get; set; } + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string AllConnectionStringLow { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + string AllConnectionStringMedium { get; set; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + double? AllocatedStorageSizeInTb { get; set; } + /// Information about Oracle APEX Application Development. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType ApexDetail { get; set; } + /// The Oracle APEX Application Development version. + string ApexDetailApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + string ApexDetailOrdsVersion { get; set; } + /// Autonomous Database ID + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + System.Collections.Generic.List AvailableUpgradeVersion { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ECPU", "OCPU")] + string ComputeModel { get; set; } + /// The connection string used to connect to the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType ConnectionString { get; set; } + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType ConnectionStringAllConnectionString { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + string ConnectionStringDedicated { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + string ConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string ConnectionStringLow { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + string ConnectionStringMedium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + System.Collections.Generic.List ConnectionStringProfile { get; set; } + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType ConnectionUrl { get; set; } + /// Oracle Application Express (APEX) URL. + string ConnectionUrlApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + string ConnectionUrlDatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + string ConnectionUrlGraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + string ConnectionUrlMachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + string ConnectionUrlMongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + string ConnectionUrlOrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + string ConnectionUrlSqlDevWebUrl { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + System.Collections.Generic.List CustomerContact { get; set; } + /// Database type to be created. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Regular", "Clone")] + string DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Registering", "Registered", "Deregistering", "NotRegistered", "Failed")] + string DataSafeStatus { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The Autonomous Database workload type + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + int? FailedDataRecoveryInSecond { get; set; } + /// The area assigned to In-Memory tables in Autonomous Database. + int? InMemoryAreaInGb { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + bool? IsPreview { get; set; } + /// Specifies if the Autonomous Database preview version is being provisioned. + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + bool? IsRemoteDataGuardEnabled { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// Views lifecycleState + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LifecycleState { get; set; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Adg", "BackupBased")] + string LocalDisasterRecoveryType { get; set; } + /// Local Autonomous Disaster Recovery standby database details. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary LocalStandbyDb { get; set; } + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + int? LocalStandbyDbLagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + string LocalStandbyDbLifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LocalStandbyDbLifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + int? MemoryPerOracleComputeUnitInGb { get; set; } + /// The character set for the Autonomous Database. + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + global::System.DateTime? NextLongTermBackupTimeStamp { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Database ocid + string Ocid { get; set; } + /// Indicates the Autonomous Database mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Enabling", "Enabled", "Disabling", "NotEnabled", "FailedEnabling", "FailedDisabling")] + string OperationsInsightsStatus { get; set; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + string PeerDbId { get; set; } + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + System.Collections.Generic.List PeerDbIds { get; set; } + /// The Autonomous Database permission level. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// The private endpoint for the resource. + string PrivateEndpoint { get; set; } + /// The private endpoint Ip address for the resource. + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + string PrivateEndpointLabel { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + System.Collections.Generic.List ProvisionableCpu { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + string ServiceConsoleUrl { get; set; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + string SqlWebDeveloperUrl { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + System.Collections.Generic.List SupportedRegionsToCloneTo { get; set; } + /// The date and time that the database was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + string TimeDeletionOfFreeAutonomousDatabase { get; set; } + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + string TimeLocalDataGuardEnabled { get; set; } + /// The date and time when maintenance will begin. + global::System.DateTime? TimeMaintenanceBegin { get; set; } + /// The date and time when maintenance will end. + global::System.DateTime? TimeMaintenanceEnd { get; set; } + /// The timestamp of the last failover operation. + string TimeOfLastFailover { get; set; } + /// The date and time when last refresh happened. + string TimeOfLastRefresh { get; set; } + /// The refresh point timestamp (UTC). + string TimeOfLastRefreshPoint { get; set; } + /// The timestamp of the last switchover operation for the Autonomous Database. + string TimeOfLastSwitchover { get; set; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + string TimeReclamationOfFreeAutonomousDatabase { get; set; } + /// The storage space consumed by Autonomous Database in GBs. + int? UsedDataStorageSizeInGb { get; set; } + /// The amount of storage that has been used, in terabytes. + int? UsedDataStorageSizeInTb { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + System.Collections.Generic.List WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.json.cs new file mode 100644 index 000000000000..f8391635442e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseBaseProperties.json.cs @@ -0,0 +1,496 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database base resource model. + public partial class AutonomousDatabaseBaseProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBaseProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_localStandbyDb = If( json?.PropertyT("localStandbyDb"), out var __jsonLocalStandbyDb) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummary.FromJson(__jsonLocalStandbyDb) : _localStandbyDb;} + {_scheduledOperation = If( json?.PropertyT("scheduledOperations"), out var __jsonScheduledOperations) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsType.FromJson(__jsonScheduledOperations) : _scheduledOperation;} + {_apexDetail = If( json?.PropertyT("apexDetails"), out var __jsonApexDetails) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsType.FromJson(__jsonApexDetails) : _apexDetail;} + {_connectionString = If( json?.PropertyT("connectionStrings"), out var __jsonConnectionStrings) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringType.FromJson(__jsonConnectionStrings) : _connectionString;} + {_connectionUrl = If( json?.PropertyT("connectionUrls"), out var __jsonConnectionUrls) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlType.FromJson(__jsonConnectionUrls) : _connectionUrl;} + {_longTermBackupSchedule = If( json?.PropertyT("longTermBackupSchedule"), out var __jsonLongTermBackupSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails.FromJson(__jsonLongTermBackupSchedule) : _longTermBackupSchedule;} + {_autonomousMaintenanceScheduleType = If( json?.PropertyT("autonomousMaintenanceScheduleType"), out var __jsonAutonomousMaintenanceScheduleType) ? (string)__jsonAutonomousMaintenanceScheduleType : (string)_autonomousMaintenanceScheduleType;} + {_characterSet = If( json?.PropertyT("characterSet"), out var __jsonCharacterSet) ? (string)__jsonCharacterSet : (string)_characterSet;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (float?)__jsonComputeCount : _computeCount;} + {_computeModel = If( json?.PropertyT("computeModel"), out var __jsonComputeModel) ? (string)__jsonComputeModel : (string)_computeModel;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : _cpuCoreCount;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact.FromJson(__u) )) ))() : null : _customerContact;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (int?)__jsonDataStorageSizeInTbs : _dataStorageSizeInTb;} + {_dataStorageSizeInGb = If( json?.PropertyT("dataStorageSizeInGbs"), out var __jsonDataStorageSizeInGbs) ? (int?)__jsonDataStorageSizeInGbs : _dataStorageSizeInGb;} + {_dbVersion = If( json?.PropertyT("dbVersion"), out var __jsonDbVersion) ? (string)__jsonDbVersion : (string)_dbVersion;} + {_dbWorkload = If( json?.PropertyT("dbWorkload"), out var __jsonDbWorkload) ? (string)__jsonDbWorkload : (string)_dbWorkload;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_isAutoScalingEnabled = If( json?.PropertyT("isAutoScalingEnabled"), out var __jsonIsAutoScalingEnabled) ? (bool?)__jsonIsAutoScalingEnabled : _isAutoScalingEnabled;} + {_isAutoScalingForStorageEnabled = If( json?.PropertyT("isAutoScalingForStorageEnabled"), out var __jsonIsAutoScalingForStorageEnabled) ? (bool?)__jsonIsAutoScalingForStorageEnabled : _isAutoScalingForStorageEnabled;} + {_peerDbIds = If( json?.PropertyT("peerDbIds"), out var __jsonPeerDbIds) ? If( __jsonPeerDbIds as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _peerDbIds;} + {_isLocalDataGuardEnabled = If( json?.PropertyT("isLocalDataGuardEnabled"), out var __jsonIsLocalDataGuardEnabled) ? (bool?)__jsonIsLocalDataGuardEnabled : _isLocalDataGuardEnabled;} + {_isRemoteDataGuardEnabled = If( json?.PropertyT("isRemoteDataGuardEnabled"), out var __jsonIsRemoteDataGuardEnabled) ? (bool?)__jsonIsRemoteDataGuardEnabled : _isRemoteDataGuardEnabled;} + {_localDisasterRecoveryType = If( json?.PropertyT("localDisasterRecoveryType"), out var __jsonLocalDisasterRecoveryType) ? (string)__jsonLocalDisasterRecoveryType : (string)_localDisasterRecoveryType;} + {_failedDataRecoveryInSecond = If( json?.PropertyT("failedDataRecoveryInSeconds"), out var __jsonFailedDataRecoveryInSeconds) ? (int?)__jsonFailedDataRecoveryInSeconds : _failedDataRecoveryInSecond;} + {_isMtlsConnectionRequired = If( json?.PropertyT("isMtlsConnectionRequired"), out var __jsonIsMtlsConnectionRequired) ? (bool?)__jsonIsMtlsConnectionRequired : _isMtlsConnectionRequired;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)_licenseModel;} + {_ncharacterSet = If( json?.PropertyT("ncharacterSet"), out var __jsonNcharacterSet) ? (string)__jsonNcharacterSet : (string)_ncharacterSet;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_privateEndpointIP = If( json?.PropertyT("privateEndpointIp"), out var __jsonPrivateEndpointIP) ? (string)__jsonPrivateEndpointIP : (string)_privateEndpointIP;} + {_privateEndpointLabel = If( json?.PropertyT("privateEndpointLabel"), out var __jsonPrivateEndpointLabel) ? (string)__jsonPrivateEndpointLabel : (string)_privateEndpointLabel;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)_ociUrl;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)_subnetId;} + {_vnetId = If( json?.PropertyT("vnetId"), out var __jsonVnetId) ? (string)__jsonVnetId : (string)_vnetId;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : _timeCreated : _timeCreated;} + {_timeMaintenanceBegin = If( json?.PropertyT("timeMaintenanceBegin"), out var __jsonTimeMaintenanceBegin) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceBegin, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceBeginValue) ? __jsonTimeMaintenanceBeginValue : _timeMaintenanceBegin : _timeMaintenanceBegin;} + {_timeMaintenanceEnd = If( json?.PropertyT("timeMaintenanceEnd"), out var __jsonTimeMaintenanceEnd) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceEndValue) ? __jsonTimeMaintenanceEndValue : _timeMaintenanceEnd : _timeMaintenanceEnd;} + {_actualUsedDataStorageSizeInTb = If( json?.PropertyT("actualUsedDataStorageSizeInTbs"), out var __jsonActualUsedDataStorageSizeInTbs) ? (double?)__jsonActualUsedDataStorageSizeInTbs : _actualUsedDataStorageSizeInTb;} + {_allocatedStorageSizeInTb = If( json?.PropertyT("allocatedStorageSizeInTbs"), out var __jsonAllocatedStorageSizeInTbs) ? (double?)__jsonAllocatedStorageSizeInTbs : _allocatedStorageSizeInTb;} + {_availableUpgradeVersion = If( json?.PropertyT("availableUpgradeVersions"), out var __jsonAvailableUpgradeVersions) ? If( __jsonAvailableUpgradeVersions as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _availableUpgradeVersion;} + {_dataSafeStatus = If( json?.PropertyT("dataSafeStatus"), out var __jsonDataSafeStatus) ? (string)__jsonDataSafeStatus : (string)_dataSafeStatus;} + {_databaseEdition = If( json?.PropertyT("databaseEdition"), out var __jsonDatabaseEdition) ? (string)__jsonDatabaseEdition : (string)_databaseEdition;} + {_autonomousDatabaseId = If( json?.PropertyT("autonomousDatabaseId"), out var __jsonAutonomousDatabaseId) ? (string)__jsonAutonomousDatabaseId : (string)_autonomousDatabaseId;} + {_inMemoryAreaInGb = If( json?.PropertyT("inMemoryAreaInGbs"), out var __jsonInMemoryAreaInGbs) ? (int?)__jsonInMemoryAreaInGbs : _inMemoryAreaInGb;} + {_nextLongTermBackupTimeStamp = If( json?.PropertyT("nextLongTermBackupTimeStamp"), out var __jsonNextLongTermBackupTimeStamp) ? global::System.DateTime.TryParse((string)__jsonNextLongTermBackupTimeStamp, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonNextLongTermBackupTimeStampValue) ? __jsonNextLongTermBackupTimeStampValue : _nextLongTermBackupTimeStamp : _nextLongTermBackupTimeStamp;} + {_isPreview = If( json?.PropertyT("isPreview"), out var __jsonIsPreview) ? (bool?)__jsonIsPreview : _isPreview;} + {_localAdgAutoFailoverMaxDataLossLimit = If( json?.PropertyT("localAdgAutoFailoverMaxDataLossLimit"), out var __jsonLocalAdgAutoFailoverMaxDataLossLimit) ? (int?)__jsonLocalAdgAutoFailoverMaxDataLossLimit : _localAdgAutoFailoverMaxDataLossLimit;} + {_memoryPerOracleComputeUnitInGb = If( json?.PropertyT("memoryPerOracleComputeUnitInGbs"), out var __jsonMemoryPerOracleComputeUnitInGbs) ? (int?)__jsonMemoryPerOracleComputeUnitInGbs : _memoryPerOracleComputeUnitInGb;} + {_openMode = If( json?.PropertyT("openMode"), out var __jsonOpenMode) ? (string)__jsonOpenMode : (string)_openMode;} + {_operationsInsightsStatus = If( json?.PropertyT("operationsInsightsStatus"), out var __jsonOperationsInsightsStatus) ? (string)__jsonOperationsInsightsStatus : (string)_operationsInsightsStatus;} + {_permissionLevel = If( json?.PropertyT("permissionLevel"), out var __jsonPermissionLevel) ? (string)__jsonPermissionLevel : (string)_permissionLevel;} + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? (string)__jsonPrivateEndpoint : (string)_privateEndpoint;} + {_provisionableCpu = If( json?.PropertyT("provisionableCpus"), out var __jsonProvisionableCpus) ? If( __jsonProvisionableCpus as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(int) (__f is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber __e ? (int)__e : default(int))) ))() : null : _provisionableCpu;} + {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)_role;} + {_serviceConsoleUrl = If( json?.PropertyT("serviceConsoleUrl"), out var __jsonServiceConsoleUrl) ? (string)__jsonServiceConsoleUrl : (string)_serviceConsoleUrl;} + {_sqlWebDeveloperUrl = If( json?.PropertyT("sqlWebDeveloperUrl"), out var __jsonSqlWebDeveloperUrl) ? (string)__jsonSqlWebDeveloperUrl : (string)_sqlWebDeveloperUrl;} + {_supportedRegionsToCloneTo = If( json?.PropertyT("supportedRegionsToCloneTo"), out var __jsonSupportedRegionsToCloneTo) ? If( __jsonSupportedRegionsToCloneTo as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(string) (__a is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString ___z ? (string)(___z.ToString()) : null)) ))() : null : _supportedRegionsToCloneTo;} + {_timeDataGuardRoleChanged = If( json?.PropertyT("timeDataGuardRoleChanged"), out var __jsonTimeDataGuardRoleChanged) ? (string)__jsonTimeDataGuardRoleChanged : (string)_timeDataGuardRoleChanged;} + {_timeDeletionOfFreeAutonomousDatabase = If( json?.PropertyT("timeDeletionOfFreeAutonomousDatabase"), out var __jsonTimeDeletionOfFreeAutonomousDatabase) ? (string)__jsonTimeDeletionOfFreeAutonomousDatabase : (string)_timeDeletionOfFreeAutonomousDatabase;} + {_timeLocalDataGuardEnabled = If( json?.PropertyT("timeLocalDataGuardEnabled"), out var __jsonTimeLocalDataGuardEnabled) ? (string)__jsonTimeLocalDataGuardEnabled : (string)_timeLocalDataGuardEnabled;} + {_timeOfLastFailover = If( json?.PropertyT("timeOfLastFailover"), out var __jsonTimeOfLastFailover) ? (string)__jsonTimeOfLastFailover : (string)_timeOfLastFailover;} + {_timeOfLastRefresh = If( json?.PropertyT("timeOfLastRefresh"), out var __jsonTimeOfLastRefresh) ? (string)__jsonTimeOfLastRefresh : (string)_timeOfLastRefresh;} + {_timeOfLastRefreshPoint = If( json?.PropertyT("timeOfLastRefreshPoint"), out var __jsonTimeOfLastRefreshPoint) ? (string)__jsonTimeOfLastRefreshPoint : (string)_timeOfLastRefreshPoint;} + {_timeOfLastSwitchover = If( json?.PropertyT("timeOfLastSwitchover"), out var __jsonTimeOfLastSwitchover) ? (string)__jsonTimeOfLastSwitchover : (string)_timeOfLastSwitchover;} + {_timeReclamationOfFreeAutonomousDatabase = If( json?.PropertyT("timeReclamationOfFreeAutonomousDatabase"), out var __jsonTimeReclamationOfFreeAutonomousDatabase) ? (string)__jsonTimeReclamationOfFreeAutonomousDatabase : (string)_timeReclamationOfFreeAutonomousDatabase;} + {_usedDataStorageSizeInGb = If( json?.PropertyT("usedDataStorageSizeInGbs"), out var __jsonUsedDataStorageSizeInGbs) ? (int?)__jsonUsedDataStorageSizeInGbs : _usedDataStorageSizeInGb;} + {_usedDataStorageSizeInTb = If( json?.PropertyT("usedDataStorageSizeInTbs"), out var __jsonUsedDataStorageSizeInTbs) ? (int?)__jsonUsedDataStorageSizeInTbs : _usedDataStorageSizeInTb;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_backupRetentionPeriodInDay = If( json?.PropertyT("backupRetentionPeriodInDays"), out var __jsonBackupRetentionPeriodInDays) ? (int?)__jsonBackupRetentionPeriodInDays : _backupRetentionPeriodInDay;} + {_whitelistedIP = If( json?.PropertyT("whitelistedIps"), out var __jsonWhitelistedIps) ? If( __jsonWhitelistedIps as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___w, (___v)=>(string) (___v is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString ___u ? (string)(___u.ToString()) : null)) ))() : null : _whitelistedIP;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties interface is polymorphic, + /// and the precise model class that will get deserialized is determined at runtime based on the payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("dataBaseType") ) + { + case "Clone": + { + return new AutonomousDatabaseCloneProperties(json); + } + case "Regular": + { + return new AutonomousDatabaseProperties(json); + } + } + return new AutonomousDatabaseBaseProperties(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._localStandbyDb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._localStandbyDb.ToJson(null,serializationMode) : null, "localStandbyDb" ,container.Add ); + } + AddIf( null != this._scheduledOperation ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._scheduledOperation.ToJson(null,serializationMode) : null, "scheduledOperations" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._apexDetail ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._apexDetail.ToJson(null,serializationMode) : null, "apexDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._connectionString ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._connectionString.ToJson(null,serializationMode) : null, "connectionStrings" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._connectionUrl ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._connectionUrl.ToJson(null,serializationMode) : null, "connectionUrls" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != this._longTermBackupSchedule ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._longTermBackupSchedule.ToJson(null,serializationMode) : null, "longTermBackupSchedule" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._adminPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._adminPassword))) : null, "adminPassword" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._dataBaseType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dataBaseType.ToString()) : null, "dataBaseType" ,container.Add ); + } + AddIf( null != (((object)this._autonomousMaintenanceScheduleType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._autonomousMaintenanceScheduleType.ToString()) : null, "autonomousMaintenanceScheduleType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._characterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._characterSet.ToString()) : null, "characterSet" ,container.Add ); + } + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((float)this._computeCount) : null, "computeCount" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._computeModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._computeModel.ToString()) : null, "computeModel" ,container.Add ); + } + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + if (null != this._customerContact) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._customerContact ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customerContacts",__w); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dataStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dataStorageSizeInGb) : null, "dataStorageSizeInGbs" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._dbVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbVersion.ToString()) : null, "dbVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._dbWorkload)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbWorkload.ToString()) : null, "dbWorkload" ,container.Add ); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != this._isAutoScalingEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isAutoScalingEnabled) : null, "isAutoScalingEnabled" ,container.Add ); + AddIf( null != this._isAutoScalingForStorageEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isAutoScalingForStorageEnabled) : null, "isAutoScalingForStorageEnabled" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._peerDbIds) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __s in this._peerDbIds ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("peerDbIds",__r); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._peerDbId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._peerDbId.ToString()) : null, "peerDbId" ,container.Add ); + } + AddIf( null != this._isLocalDataGuardEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isLocalDataGuardEnabled) : null, "isLocalDataGuardEnabled" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isRemoteDataGuardEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isRemoteDataGuardEnabled) : null, "isRemoteDataGuardEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._localDisasterRecoveryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._localDisasterRecoveryType.ToString()) : null, "localDisasterRecoveryType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._failedDataRecoveryInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._failedDataRecoveryInSecond) : null, "failedDataRecoveryInSeconds" ,container.Add ); + } + AddIf( null != this._isMtlsConnectionRequired ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isMtlsConnectionRequired) : null, "isMtlsConnectionRequired" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._isPreviewVersionWithServiceTermsAccepted ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isPreviewVersionWithServiceTermsAccepted) : null, "isPreviewVersionWithServiceTermsAccepted" ,container.Add ); + } + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._ncharacterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ncharacterSet.ToString()) : null, "ncharacterSet" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._privateEndpointIP)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._privateEndpointIP.ToString()) : null, "privateEndpointIp" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._privateEndpointLabel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._privateEndpointLabel.ToString()) : null, "privateEndpointLabel" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._vnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._vnetId.ToString()) : null, "vnetId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeMaintenanceBegin ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeMaintenanceBegin?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceBegin" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeMaintenanceEnd ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeMaintenanceEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceEnd" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._actualUsedDataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._actualUsedDataStorageSizeInTb) : null, "actualUsedDataStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._allocatedStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._allocatedStorageSizeInTb) : null, "allocatedStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._availableUpgradeVersion) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __n in this._availableUpgradeVersion ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("availableUpgradeVersions",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._dataSafeStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dataSafeStatus.ToString()) : null, "dataSafeStatus" ,container.Add ); + } + AddIf( null != (((object)this._databaseEdition)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._databaseEdition.ToString()) : null, "databaseEdition" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._autonomousDatabaseId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._autonomousDatabaseId.ToString()) : null, "autonomousDatabaseId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._inMemoryAreaInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._inMemoryAreaInGb) : null, "inMemoryAreaInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._nextLongTermBackupTimeStamp ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLongTermBackupTimeStamp?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "nextLongTermBackupTimeStamp" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isPreview ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isPreview) : null, "isPreview" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != this._localAdgAutoFailoverMaxDataLossLimit ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._localAdgAutoFailoverMaxDataLossLimit) : null, "localAdgAutoFailoverMaxDataLossLimit" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._memoryPerOracleComputeUnitInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._memoryPerOracleComputeUnitInGb) : null, "memoryPerOracleComputeUnitInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._openMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._openMode.ToString()) : null, "openMode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._operationsInsightsStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._operationsInsightsStatus.ToString()) : null, "operationsInsightsStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._permissionLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._permissionLevel.ToString()) : null, "permissionLevel" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._privateEndpoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._privateEndpoint.ToString()) : null, "privateEndpoint" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._provisionableCpu) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __i in this._provisionableCpu ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber(__i) ,__h.Add); + } + container.Add("provisionableCpus",__h); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._serviceConsoleUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._serviceConsoleUrl.ToString()) : null, "serviceConsoleUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._sqlWebDeveloperUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._sqlWebDeveloperUrl.ToString()) : null, "sqlWebDeveloperUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._supportedRegionsToCloneTo) + { + var __c = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __d in this._supportedRegionsToCloneTo ) + { + AddIf(null != (((object)__d)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__d.ToString()) : null ,__c.Add); + } + container.Add("supportedRegionsToCloneTo",__c); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeDataGuardRoleChanged)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeDataGuardRoleChanged.ToString()) : null, "timeDataGuardRoleChanged" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeDeletionOfFreeAutonomousDatabase)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeDeletionOfFreeAutonomousDatabase.ToString()) : null, "timeDeletionOfFreeAutonomousDatabase" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeLocalDataGuardEnabled)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeLocalDataGuardEnabled.ToString()) : null, "timeLocalDataGuardEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeOfLastFailover)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeOfLastFailover.ToString()) : null, "timeOfLastFailover" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeOfLastRefresh)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeOfLastRefresh.ToString()) : null, "timeOfLastRefresh" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeOfLastRefreshPoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeOfLastRefreshPoint.ToString()) : null, "timeOfLastRefreshPoint" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeOfLastSwitchover)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeOfLastSwitchover.ToString()) : null, "timeOfLastSwitchover" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeReclamationOfFreeAutonomousDatabase)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeReclamationOfFreeAutonomousDatabase.ToString()) : null, "timeReclamationOfFreeAutonomousDatabase" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._usedDataStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._usedDataStorageSizeInGb) : null, "usedDataStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._usedDataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._usedDataStorageSizeInTb) : null, "usedDataStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + AddIf( null != this._backupRetentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._backupRetentionPeriodInDay) : null, "backupRetentionPeriodInDays" ,container.Add ); + if (null != this._whitelistedIP) + { + var ___x = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var ___y in this._whitelistedIP ) + { + AddIf(null != (((object)___y)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(___y.ToString()) : null ,___x.Add); + } + container.Add("whitelistedIps",___x); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.PowerShell.cs new file mode 100644 index 000000000000..5596a6b7e3e5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.PowerShell.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDatabaseCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetTypeConverter))] + public partial class AutonomousDatabaseCharacterSet + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCharacterSet(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCharacterSet(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCharacterSet(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCharacterSet(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDatabaseCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetTypeConverter))] + public partial interface IAutonomousDatabaseCharacterSet + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.TypeConverter.cs new file mode 100644 index 000000000000..bb6975ae8970 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseCharacterSetTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCharacterSet.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSet.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSet.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.cs new file mode 100644 index 000000000000..8e3ad5046485 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSets resource definition + public partial class AutonomousDatabaseCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal)Property).CharacterSet; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for CharacterSet + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal.CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal)Property).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal)Property).CharacterSet = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public AutonomousDatabaseCharacterSet() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// AutonomousDatabaseCharacterSets resource definition + public partial interface IAutonomousDatabaseCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle Autonomous Database supported character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; } + + } + /// AutonomousDatabaseCharacterSets resource definition + internal partial interface IAutonomousDatabaseCharacterSetInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// The Oracle Autonomous Database supported character sets. + string CharacterSet { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.json.cs new file mode 100644 index 000000000000..3504cd6ecce2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSet.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSets resource definition + public partial class AutonomousDatabaseCharacterSet + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCharacterSet(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseCharacterSet(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.PowerShell.cs new file mode 100644 index 000000000000..9bf108fc2b2f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a AutonomousDatabaseCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetListResultTypeConverter))] + public partial class AutonomousDatabaseCharacterSetListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCharacterSetListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCharacterSetListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCharacterSetListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCharacterSetListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a AutonomousDatabaseCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetListResultTypeConverter))] + public partial interface IAutonomousDatabaseCharacterSetListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.TypeConverter.cs new file mode 100644 index 000000000000..6ff63f229acb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseCharacterSetListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCharacterSetListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.cs new file mode 100644 index 000000000000..6fe4eb2442db --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabaseCharacterSet list operation. + public partial class AutonomousDatabaseCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The AutonomousDatabaseCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseCharacterSetListResult() + { + + } + } + /// The response of a AutonomousDatabaseCharacterSet list operation. + public partial interface IAutonomousDatabaseCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabaseCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The AutonomousDatabaseCharacterSet items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a AutonomousDatabaseCharacterSet list operation. + internal partial interface IAutonomousDatabaseCharacterSetListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabaseCharacterSet items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.json.cs new file mode 100644 index 000000000000..fffd14e2291d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetListResult.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabaseCharacterSet list operation. + public partial class AutonomousDatabaseCharacterSetListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCharacterSetListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSet.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseCharacterSetListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.PowerShell.cs new file mode 100644 index 000000000000..62052bfd1160 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.PowerShell.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDatabaseCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetPropertiesTypeConverter))] + public partial class AutonomousDatabaseCharacterSetProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCharacterSetProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCharacterSetProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCharacterSetProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCharacterSetProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDatabaseCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseCharacterSetProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.TypeConverter.cs new file mode 100644 index 000000000000..798cdfcd0c73 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseCharacterSetPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCharacterSetProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.cs new file mode 100644 index 000000000000..c4d8c23eafdb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSet resource model + public partial class AutonomousDatabaseCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal + { + + /// Backing field for property. + private string _characterSet; + + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CharacterSet { get => this._characterSet; } + + /// Internal Acessors for CharacterSet + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetPropertiesInternal.CharacterSet { get => this._characterSet; set { {_characterSet = value;} } } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseCharacterSetProperties() + { + + } + } + /// AutonomousDatabaseCharacterSet resource model + public partial interface IAutonomousDatabaseCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle Autonomous Database supported character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; } + + } + /// AutonomousDatabaseCharacterSet resource model + internal partial interface IAutonomousDatabaseCharacterSetPropertiesInternal + + { + /// The Oracle Autonomous Database supported character sets. + string CharacterSet { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.json.cs new file mode 100644 index 000000000000..8b08b2470357 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCharacterSetProperties.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSet resource model + public partial class AutonomousDatabaseCharacterSetProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCharacterSetProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_characterSet = If( json?.PropertyT("characterSet"), out var __jsonCharacterSet) ? (string)__jsonCharacterSet : (string)_characterSet;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseCharacterSetProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._characterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._characterSet.ToString()) : null, "characterSet" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.PowerShell.cs new file mode 100644 index 000000000000..e3e0f9a3bddd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.PowerShell.cs @@ -0,0 +1,1070 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Autonomous Database clone resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseClonePropertiesTypeConverter))] + public partial class AutonomousDatabaseCloneProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCloneProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("CloneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).CloneType = (string) content.GetValueForProperty("CloneType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).CloneType, global::System.Convert.ToString); + } + if (content.Contains("IsReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled = (bool?) content.GetValueForProperty("IsReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRefreshableClone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone = (bool?) content.GetValueForProperty("IsRefreshableClone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RefreshableModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel = (string) content.GetValueForProperty("RefreshableModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel, global::System.Convert.ToString); + } + if (content.Contains("RefreshableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus = (string) content.GetValueForProperty("RefreshableStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus, global::System.Convert.ToString); + } + if (content.Contains("TimeUntilReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled = (string) content.GetValueForProperty("TimeUntilReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCloneProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("CloneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).CloneType = (string) content.GetValueForProperty("CloneType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).CloneType, global::System.Convert.ToString); + } + if (content.Contains("IsReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled = (bool?) content.GetValueForProperty("IsReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRefreshableClone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone = (bool?) content.GetValueForProperty("IsRefreshableClone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RefreshableModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel = (string) content.GetValueForProperty("RefreshableModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel, global::System.Convert.ToString); + } + if (content.Contains("RefreshableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus = (string) content.GetValueForProperty("RefreshableStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus, global::System.Convert.ToString); + } + if (content.Contains("TimeUntilReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled = (string) content.GetValueForProperty("TimeUntilReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCloneProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCloneProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Autonomous Database clone resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseClonePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseCloneProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.TypeConverter.cs new file mode 100644 index 000000000000..586da3614564 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseClonePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCloneProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCloneProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCloneProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.cs new file mode 100644 index 000000000000..90bea5355a30 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.cs @@ -0,0 +1,892 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database clone resource model. + public partial class AutonomousDatabaseCloneProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword = value ?? null; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; } + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType = value ?? null; } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet = value ?? null; } + + /// Backing field for property. + private string _cloneType; + + /// The Autonomous Database clone type. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CloneType { get => this._cloneType; set => this._cloneType = value; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel = value ?? null; } + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; } + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value ?? null /* model class */; } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated = value ?? null; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DataBaseType { get => "Clone"; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType = "Clone"; } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition = value ?? null; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName = value ?? null; } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload = value ?? null; } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Backing field for property. + private bool? _isReconnectCloneEnabled; + + /// Indicates if the refreshable clone can be reconnected to its source database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsReconnectCloneEnabled { get => this._isReconnectCloneEnabled; } + + /// Backing field for property. + private bool? _isRefreshableClone; + + /// Indicates if the Autonomous Database is a refreshable clone. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsRefreshableClone { get => this._isRefreshableClone; } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel = value ?? null; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; } + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; } + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; } + + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState = value ?? null; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value ?? null /* model class */; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence = value ?? null; } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString = value; } + + /// Internal Acessors for ConnectionStringAllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb = value; } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbIds + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.PeerDbIds { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbIds; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbIds = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint = value; } + + /// Internal Acessors for ProvisionableCpu + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState = value; } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value; } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb = value; } + + /// Internal Acessors for IsReconnectCloneEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal.IsReconnectCloneEnabled { get => this._isReconnectCloneEnabled; set { {_isReconnectCloneEnabled = value;} } } + + /// Internal Acessors for IsRefreshableClone + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal.IsRefreshableClone { get => this._isRefreshableClone; set { {_isRefreshableClone = value;} } } + + /// Internal Acessors for RefreshableStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseClonePropertiesInternal.RefreshableStatus { get => this._refreshableStatus; set { {_refreshableStatus = value;} } } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode = value ?? null; } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId = value ?? null; } + + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List PeerDbIds { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbIds; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel = value ?? null; } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel = value ?? null; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; } + + /// Backing field for property. + private string _refreshableModel; + + /// The refresh mode of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string RefreshableModel { get => this._refreshableModel; set => this._refreshableModel = value; } + + /// Backing field for property. + private string _refreshableStatus; + + /// The refresh status of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string RefreshableStatus { get => this._refreshableStatus; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role = value ?? null; } + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value ?? null /* model class */; } + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value ?? null /* model class */; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; } + + /// Backing field for property. + private string _source; + + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Source { get => this._source; set => this._source = value; } + + /// Backing field for property. + private string _sourceId; + + /// + /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SourceId { get => this._sourceId; set => this._sourceId = value; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; } + + /// Backing field for property. + private string _timeUntilReconnectCloneEnabled; + + /// + /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone + /// to be reconnected to its source database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeUntilReconnectCloneEnabled { get => this._timeUntilReconnectCloneEnabled; set => this._timeUntilReconnectCloneEnabled = value; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId = value ?? null; } + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabaseCloneProperties() + { + this.__autonomousDatabaseBaseProperties.DataBaseType = "Clone"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + } + } + /// Autonomous Database clone resource model. + public partial interface IAutonomousDatabaseCloneProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties + { + /// The Autonomous Database clone type. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = false, + Create = true, + Update = false, + Description = @"The Autonomous Database clone type.", + SerializedName = @"cloneType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Full", "Metadata")] + string CloneType { get; set; } + /// Indicates if the refreshable clone can be reconnected to its source database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates if the refreshable clone can be reconnected to its source database.", + SerializedName = @"isReconnectCloneEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsReconnectCloneEnabled { get; } + /// Indicates if the Autonomous Database is a refreshable clone. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates if the Autonomous Database is a refreshable clone.", + SerializedName = @"isRefreshableClone", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRefreshableClone { get; } + /// The refresh mode of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = false, + Description = @"The refresh mode of the clone.", + SerializedName = @"refreshableModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Automatic", "Manual")] + string RefreshableModel { get; set; } + /// The refresh status of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The refresh status of the clone.", + SerializedName = @"refreshableStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Refreshing", "NotRefreshing")] + string RefreshableStatus { get; } + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = false, + Description = @"The source of the database.", + SerializedName = @"source", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("None", "Database", "BackupFromId", "BackupFromTimestamp", "CloneToRefreshable", "CrossRegionDataguard", "CrossRegionDisasterRecovery")] + string Source { get; set; } + /// + /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database.", + SerializedName = @"sourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceId { get; set; } + /// + /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone + /// to be reconnected to its source database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database.", + SerializedName = @"timeUntilReconnectCloneEnabled", + PossibleTypes = new [] { typeof(string) })] + string TimeUntilReconnectCloneEnabled { get; set; } + + } + /// Autonomous Database clone resource model. + internal partial interface IAutonomousDatabaseClonePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal + { + /// The Autonomous Database clone type. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Full", "Metadata")] + string CloneType { get; set; } + /// Indicates if the refreshable clone can be reconnected to its source database. + bool? IsReconnectCloneEnabled { get; set; } + /// Indicates if the Autonomous Database is a refreshable clone. + bool? IsRefreshableClone { get; set; } + /// The refresh mode of the clone. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Automatic", "Manual")] + string RefreshableModel { get; set; } + /// The refresh status of the clone. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Refreshing", "NotRefreshing")] + string RefreshableStatus { get; set; } + /// The source of the database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("None", "Database", "BackupFromId", "BackupFromTimestamp", "CloneToRefreshable", "CrossRegionDataguard", "CrossRegionDisasterRecovery")] + string Source { get; set; } + /// + /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// + string SourceId { get; set; } + /// + /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone + /// to be reconnected to its source database. + /// + string TimeUntilReconnectCloneEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.json.cs new file mode 100644 index 000000000000..bbe1bc7cc032 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseCloneProperties.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database clone resource model. + public partial class AutonomousDatabaseCloneProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCloneProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties(json); + {_sourceId = If( json?.PropertyT("sourceId"), out var __jsonSourceId) ? (string)__jsonSourceId : (string)_sourceId;} + {_isReconnectCloneEnabled = If( json?.PropertyT("isReconnectCloneEnabled"), out var __jsonIsReconnectCloneEnabled) ? (bool?)__jsonIsReconnectCloneEnabled : _isReconnectCloneEnabled;} + {_isRefreshableClone = If( json?.PropertyT("isRefreshableClone"), out var __jsonIsRefreshableClone) ? (bool?)__jsonIsRefreshableClone : _isRefreshableClone;} + {_refreshableStatus = If( json?.PropertyT("refreshableStatus"), out var __jsonRefreshableStatus) ? (string)__jsonRefreshableStatus : (string)_refreshableStatus;} + {_timeUntilReconnectCloneEnabled = If( json?.PropertyT("timeUntilReconnectCloneEnabled"), out var __jsonTimeUntilReconnectCloneEnabled) ? (string)__jsonTimeUntilReconnectCloneEnabled : (string)_timeUntilReconnectCloneEnabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCloneProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseCloneProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __autonomousDatabaseBaseProperties?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._cloneType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloneType.ToString()) : null, "cloneType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isReconnectCloneEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isReconnectCloneEnabled) : null, "isReconnectCloneEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isRefreshableClone ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isRefreshableClone) : null, "isRefreshableClone" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._refreshableModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._refreshableModel.ToString()) : null, "refreshableModel" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._refreshableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._refreshableStatus.ToString()) : null, "refreshableStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._timeUntilReconnectCloneEnabled)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeUntilReconnectCloneEnabled.ToString()) : null, "timeUntilReconnectCloneEnabled" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.PowerShell.cs new file mode 100644 index 000000000000..2accfc96bb53 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a AutonomousDatabase list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseListResultTypeConverter))] + public partial class AutonomousDatabaseListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a AutonomousDatabase list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseListResultTypeConverter))] + public partial interface IAutonomousDatabaseListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.TypeConverter.cs new file mode 100644 index 000000000000..ef4933a170ab --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.cs new file mode 100644 index 000000000000..7345a2a10d88 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabase list operation. + public partial class AutonomousDatabaseListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The AutonomousDatabase items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AutonomousDatabaseListResult() + { + + } + } + /// The response of a AutonomousDatabase list operation. + public partial interface IAutonomousDatabaseListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabase items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The AutonomousDatabase items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a AutonomousDatabase list operation. + internal partial interface IAutonomousDatabaseListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabase items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.json.cs new file mode 100644 index 000000000000..88f6a047d746 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabase list operation. + public partial class AutonomousDatabaseListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.PowerShell.cs new file mode 100644 index 000000000000..31bdc98d4a54 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.PowerShell.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDatabaseNationalCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetTypeConverter))] + public partial class AutonomousDatabaseNationalCharacterSet + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseNationalCharacterSet(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseNationalCharacterSet(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseNationalCharacterSet(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseNationalCharacterSet(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDatabaseNationalCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetTypeConverter))] + public partial interface IAutonomousDatabaseNationalCharacterSet + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.TypeConverter.cs new file mode 100644 index 000000000000..80679b407a7a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseNationalCharacterSetTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseNationalCharacterSet.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSet.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSet.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.cs new file mode 100644 index 000000000000..8c262b97fa1a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSets resource definition + public partial class AutonomousDatabaseNationalCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)Property).CharacterSet; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for CharacterSet + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal.CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)Property).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)Property).CharacterSet = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public AutonomousDatabaseNationalCharacterSet() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// AutonomousDatabaseNationalCharacterSets resource definition + public partial interface IAutonomousDatabaseNationalCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle Autonomous Database supported national character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; } + + } + /// AutonomousDatabaseNationalCharacterSets resource definition + internal partial interface IAutonomousDatabaseNationalCharacterSetInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// The Oracle Autonomous Database supported national character sets. + string CharacterSet { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.json.cs new file mode 100644 index 000000000000..8a6dcf15dc84 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSet.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSets resource definition + public partial class AutonomousDatabaseNationalCharacterSet + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseNationalCharacterSet(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseNationalCharacterSet(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.PowerShell.cs new file mode 100644 index 000000000000..bac6bf127d5b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.PowerShell.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetListResultTypeConverter))] + public partial class AutonomousDatabaseNationalCharacterSetListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseNationalCharacterSetListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseNationalCharacterSetListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseNationalCharacterSetListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseNationalCharacterSetListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetListResultTypeConverter))] + public partial interface IAutonomousDatabaseNationalCharacterSetListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.TypeConverter.cs new file mode 100644 index 000000000000..64b4b3b6c939 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseNationalCharacterSetListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseNationalCharacterSetListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.cs new file mode 100644 index 000000000000..bf4bfbc66800 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + public partial class AutonomousDatabaseNationalCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The AutonomousDatabaseNationalCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseNationalCharacterSetListResult() + { + + } + } + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + public partial interface IAutonomousDatabaseNationalCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabaseNationalCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The AutonomousDatabaseNationalCharacterSet items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + internal partial interface IAutonomousDatabaseNationalCharacterSetListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabaseNationalCharacterSet items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.json.cs new file mode 100644 index 000000000000..347d199dbb9f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetListResult.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + public partial class AutonomousDatabaseNationalCharacterSetListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseNationalCharacterSetListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSet.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseNationalCharacterSetListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.PowerShell.cs new file mode 100644 index 000000000000..2b6fd4da2e64 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.PowerShell.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDatabaseNationalCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter))] + public partial class AutonomousDatabaseNationalCharacterSetProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseNationalCharacterSetProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseNationalCharacterSetProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseNationalCharacterSetProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseNationalCharacterSetProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDatabaseNationalCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseNationalCharacterSetProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.TypeConverter.cs new file mode 100644 index 000000000000..12e2f9ca6f52 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseNationalCharacterSetProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.cs new file mode 100644 index 000000000000..8b39a6999b84 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSet resource model + public partial class AutonomousDatabaseNationalCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal + { + + /// Backing field for property. + private string _characterSet; + + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CharacterSet { get => this._characterSet; } + + /// Internal Acessors for CharacterSet + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetPropertiesInternal.CharacterSet { get => this._characterSet; set { {_characterSet = value;} } } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseNationalCharacterSetProperties() + { + + } + } + /// AutonomousDatabaseNationalCharacterSet resource model + public partial interface IAutonomousDatabaseNationalCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Oracle Autonomous Database supported national character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; } + + } + /// AutonomousDatabaseNationalCharacterSet resource model + internal partial interface IAutonomousDatabaseNationalCharacterSetPropertiesInternal + + { + /// The Oracle Autonomous Database supported national character sets. + string CharacterSet { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.json.cs new file mode 100644 index 000000000000..7f43605f1688 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseNationalCharacterSetProperties.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSet resource model + public partial class AutonomousDatabaseNationalCharacterSetProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseNationalCharacterSetProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_characterSet = If( json?.PropertyT("characterSet"), out var __jsonCharacterSet) ? (string)__jsonCharacterSet : (string)_characterSet;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseNationalCharacterSetProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._characterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._characterSet.ToString()) : null, "characterSet" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.PowerShell.cs new file mode 100644 index 000000000000..3f6a33ac1641 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.PowerShell.cs @@ -0,0 +1,1004 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasePropertiesTypeConverter))] + public partial class AutonomousDatabaseProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (string) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (System.Collections.Generic.List) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (string) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, global::System.Convert.ToString); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbIds")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds = (System.Collections.Generic.List) content.GetValueForProperty("PeerDbIds",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbIds, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (string) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, global::System.Convert.ToString); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (System.Collections.Generic.List) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (string) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (string) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (System.Collections.Generic.List) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (System.Collections.Generic.List) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.TypeConverter.cs new file mode 100644 index 000000000000..9b8d03c01ac5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.cs new file mode 100644 index 000000000000..69474bd5bb89 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.cs @@ -0,0 +1,700 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabasePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword = value ?? null; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; } + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType = value ?? null; } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet = value ?? null; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel = value ?? null; } + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; } + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value ?? null /* model class */; } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated = value ?? null; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Constant] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DataBaseType { get => "Regular"; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType = "Regular"; } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition = value ?? null; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName = value ?? null; } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload = value ?? null; } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel = value ?? null; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; } + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; } + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; } + + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState = value ?? null; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value ?? null /* model class */; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence = value ?? null; } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString = value; } + + /// Internal Acessors for ConnectionStringAllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb = value; } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbIds + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.PeerDbIds { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbIds; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbIds = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint = value; } + + /// Internal Acessors for ProvisionableCpu + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState = value; } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value; } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb = value; } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode = value ?? null; } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId = value ?? null; } + + /// + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located + /// in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database + /// Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List PeerDbIds { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbIds; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel = value ?? null; } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel = value ?? null; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role = value ?? null; } + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value ?? null /* model class */; } + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value ?? null /* model class */; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned + /// in the same region as the primary database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId = value ?? null; } + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public System.Collections.Generic.List WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabaseProperties() + { + this.__autonomousDatabaseBaseProperties.DataBaseType = "Regular"; + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + } + } + /// Autonomous Database resource model. + public partial interface IAutonomousDatabaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBaseProperties + { + + } + /// Autonomous Database resource model. + internal partial interface IAutonomousDatabasePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBasePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.json.cs new file mode 100644 index 000000000000..9fc0ee587f14 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabaseProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBaseProperties(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __autonomousDatabaseBaseProperties?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.PowerShell.cs new file mode 100644 index 000000000000..c84216484a41 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Autonomous Disaster Recovery standby database details. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseStandbySummaryTypeConverter))] + public partial class AutonomousDatabaseStandbySummary + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseStandbySummary(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond = (int?) content.GetValueForProperty("LagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseStandbySummary(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond = (int?) content.GetValueForProperty("LagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseStandbySummary(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseStandbySummary(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Autonomous Disaster Recovery standby database details. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseStandbySummaryTypeConverter))] + public partial interface IAutonomousDatabaseStandbySummary + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.TypeConverter.cs new file mode 100644 index 000000000000..44a28cb16cbb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseStandbySummaryTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseStandbySummary.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseStandbySummary.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseStandbySummary.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.cs new file mode 100644 index 000000000000..6fa199a99ec2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Disaster Recovery standby database details. + public partial class AutonomousDatabaseStandbySummary : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummaryInternal + { + + /// Backing field for property. + private int? _lagTimeInSecond; + + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? LagTimeInSecond { get => this._lagTimeInSecond; set => this._lagTimeInSecond = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; set => this._lifecycleDetail = value; } + + /// Backing field for property. + private string _lifecycleState; + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Backing field for property. + private string _timeDataGuardRoleChanged; + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeDataGuardRoleChanged { get => this._timeDataGuardRoleChanged; set => this._timeDataGuardRoleChanged = value; } + + /// Backing field for property. + private string _timeDisasterRecoveryRoleChanged; + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeDisasterRecoveryRoleChanged { get => this._timeDisasterRecoveryRoleChanged; set => this._timeDisasterRecoveryRoleChanged = value; } + + /// Creates an new instance. + public AutonomousDatabaseStandbySummary() + { + + } + } + /// Autonomous Disaster Recovery standby database details. + public partial interface IAutonomousDatabaseStandbySummary : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used to determine the potential data loss in the event of a failover.", + SerializedName = @"lagTimeInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? LagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The current state of the Autonomous Database.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDisasterRecoveryRoleChanged { get; set; } + + } + /// Autonomous Disaster Recovery standby database details. + internal partial interface IAutonomousDatabaseStandbySummaryInternal + + { + /// + /// The amount of time, in seconds, that the data of the standby database lags the data of the primary database. Can be used + /// to determine the potential data loss in the event of a failover. + /// + int? LagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Unavailable", "RestoreInProgress", "RestoreFailed", "BackupInProgress", "ScaleInProgress", "AvailableNeedsAttention", "Updating", "MaintenanceInProgress", "Restarting", "Recreating", "RoleChangeInProgress", "Upgrading", "Inaccessible", "Standby")] + string LifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + string TimeDisasterRecoveryRoleChanged { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.json.cs new file mode 100644 index 000000000000..7b2f036d12f3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseStandbySummary.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Disaster Recovery standby database details. + public partial class AutonomousDatabaseStandbySummary + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseStandbySummary(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_lagTimeInSecond = If( json?.PropertyT("lagTimeInSeconds"), out var __jsonLagTimeInSeconds) ? (int?)__jsonLagTimeInSeconds : _lagTimeInSecond;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_timeDataGuardRoleChanged = If( json?.PropertyT("timeDataGuardRoleChanged"), out var __jsonTimeDataGuardRoleChanged) ? (string)__jsonTimeDataGuardRoleChanged : (string)_timeDataGuardRoleChanged;} + {_timeDisasterRecoveryRoleChanged = If( json?.PropertyT("timeDisasterRecoveryRoleChanged"), out var __jsonTimeDisasterRecoveryRoleChanged) ? (string)__jsonTimeDisasterRecoveryRoleChanged : (string)_timeDisasterRecoveryRoleChanged;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseStandbySummary FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseStandbySummary(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._lagTimeInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._lagTimeInSecond) : null, "lagTimeInSeconds" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + AddIf( null != (((object)this._timeDataGuardRoleChanged)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeDataGuardRoleChanged.ToString()) : null, "timeDataGuardRoleChanged" ,container.Add ); + AddIf( null != (((object)this._timeDisasterRecoveryRoleChanged)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeDisasterRecoveryRoleChanged.ToString()) : null, "timeDisasterRecoveryRoleChanged" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.PowerShell.cs new file mode 100644 index 000000000000..cc7cb6038fdc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.PowerShell.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The type used for update operations of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTypeConverter))] + public partial class AutonomousDatabaseUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTypeConverter))] + public partial interface IAutonomousDatabaseUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.TypeConverter.cs new file mode 100644 index 000000000000..5f79fc04733a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.cs new file mode 100644 index 000000000000..c04f7842db86 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.cs @@ -0,0 +1,645 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal + { + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).AdminPassword = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).AutonomousMaintenanceScheduleType = value ?? null; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ComputeCount = value ?? default(float); } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DatabaseEdition = value ?? null; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DayOfWeekName = value ?? null; } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsMtlsConnectionRequired = value ?? default(bool); } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LicenseModel = value ?? null; } + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence = value ?? null; } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal.LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupSchedule = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateProperties()); set { {_property = value;} } } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal.ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperation = value; } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationDayOfWeek = value; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).OpenMode = value ?? null; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).PeerDbId = value ?? null; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).PermissionLevel = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties _property; + + /// The updatable properties of the AutonomousDatabase. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateProperties()); set => this._property = value; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).Role = value ?? null; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStopTime = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateTags()); set => this._tag = value; } + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)Property).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabaseUpdate() + { + + } + } + /// The type used for update operations of the AutonomousDatabase. + public partial interface IAutonomousDatabaseUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = true, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags Tag { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List WhitelistedIP { get; set; } + + } + /// The type used for update operations of the AutonomousDatabase. + internal partial interface IAutonomousDatabaseUpdateInternal + + { + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + System.Collections.Generic.List CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// The updatable properties of the AutonomousDatabase. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties Property { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags Tag { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + System.Collections.Generic.List WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.json.cs new file mode 100644 index 000000000000..42eebda8f90b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateProperties.FromJson(__jsonProperties) : _property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateTags.FromJson(__jsonTags) : _tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..2024a3bc3196 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.PowerShell.cs @@ -0,0 +1,406 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The updatable properties of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdatePropertiesTypeConverter))] + public partial class AutonomousDatabaseUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType = (string) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition = (string) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition, global::System.Convert.ToString); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode = (string) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode, global::System.Convert.ToString); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel = (string) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel, global::System.Convert.ToString); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).Role, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP = (System.Collections.Generic.List) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (string) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdatePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..b44a5d63278b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.cs new file mode 100644 index 000000000000..0b10295ae204 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.cs @@ -0,0 +1,690 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal + { + + /// Backing field for property. + private System.Security.SecureString _adminPassword; + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Security.SecureString AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } + + /// Backing field for property. + private string _autonomousMaintenanceScheduleType; + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string AutonomousMaintenanceScheduleType { get => this._autonomousMaintenanceScheduleType; set => this._autonomousMaintenanceScheduleType = value; } + + /// Backing field for property. + private int? _backupRetentionPeriodInDay; + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? BackupRetentionPeriodInDay { get => this._backupRetentionPeriodInDay; set => this._backupRetentionPeriodInDay = value; } + + /// Backing field for property. + private float? _computeCount; + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public float? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private System.Collections.Generic.List _customerContact; + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private int? _dataStorageSizeInGb; + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DataStorageSizeInGb { get => this._dataStorageSizeInGb; set => this._dataStorageSizeInGb = value; } + + /// Backing field for property. + private int? _dataStorageSizeInTb; + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private string _databaseEdition; + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DatabaseEdition { get => this._databaseEdition; set => this._databaseEdition = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeekName = value ?? null; } + + /// Backing field for property. + private string _displayName; + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private bool? _isAutoScalingEnabled; + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsAutoScalingEnabled { get => this._isAutoScalingEnabled; set => this._isAutoScalingEnabled = value; } + + /// Backing field for property. + private bool? _isAutoScalingForStorageEnabled; + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsAutoScalingForStorageEnabled { get => this._isAutoScalingForStorageEnabled; set => this._isAutoScalingForStorageEnabled = value; } + + /// Backing field for property. + private bool? _isLocalDataGuardEnabled; + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsLocalDataGuardEnabled { get => this._isLocalDataGuardEnabled; set => this._isLocalDataGuardEnabled = value; } + + /// Backing field for property. + private bool? _isMtlsConnectionRequired; + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsMtlsConnectionRequired { get => this._isMtlsConnectionRequired; set => this._isMtlsConnectionRequired = value; } + + /// Backing field for property. + private string _licenseModel; + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private int? _localAdgAutoFailoverMaxDataLossLimit; + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => this._localAdgAutoFailoverMaxDataLossLimit; set => this._localAdgAutoFailoverMaxDataLossLimit = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails _longTermBackupSchedule; + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails()); set => this._longTermBackupSchedule = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence = value ?? null; } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup = value ?? default(global::System.DateTime); } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal.LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails()); set { {_longTermBackupSchedule = value;} } } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal.ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdate()); set { {_scheduledOperation = value;} } } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdatePropertiesInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeek = value; } + + /// Backing field for property. + private string _openMode; + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OpenMode { get => this._openMode; set => this._openMode = value; } + + /// Backing field for property. + private string _peerDbId; + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PeerDbId { get => this._peerDbId; set => this._peerDbId = value; } + + /// Backing field for property. + private string _permissionLevel; + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PermissionLevel { get => this._permissionLevel; set => this._permissionLevel = value; } + + /// Backing field for property. + private string _role; + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Role { get => this._role; set => this._role = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate _scheduledOperation; + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdate()); set => this._scheduledOperation = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStopTime = value ?? null; } + + /// Backing field for property. + private System.Collections.Generic.List _whitelistedIP; + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List WhitelistedIP { get => this._whitelistedIP; set => this._whitelistedIP = value; } + + /// Creates an new instance. + public AutonomousDatabaseUpdateProperties() + { + + } + } + /// The updatable properties of the AutonomousDatabase. + public partial interface IAutonomousDatabaseUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = true, + Update = true, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List WhitelistedIP { get; set; } + + } + /// The updatable properties of the AutonomousDatabase. + internal partial interface IAutonomousDatabaseUpdatePropertiesInternal + + { + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + string AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + System.Collections.Generic.List CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + string DatabaseEdition { get; set; } + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + string OpenMode { get; set; } + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + string PermissionLevel { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + string Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + System.Collections.Generic.List WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.json.cs new file mode 100644 index 000000000000..f2767c612878 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateProperties.json.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scheduledOperation = If( json?.PropertyT("scheduledOperations"), out var __jsonScheduledOperations) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ScheduledOperationsTypeUpdate.FromJson(__jsonScheduledOperations) : _scheduledOperation;} + {_longTermBackupSchedule = If( json?.PropertyT("longTermBackupSchedule"), out var __jsonLongTermBackupSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.LongTermBackUpScheduleDetails.FromJson(__jsonLongTermBackupSchedule) : _longTermBackupSchedule;} + {_autonomousMaintenanceScheduleType = If( json?.PropertyT("autonomousMaintenanceScheduleType"), out var __jsonAutonomousMaintenanceScheduleType) ? (string)__jsonAutonomousMaintenanceScheduleType : (string)_autonomousMaintenanceScheduleType;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (float?)__jsonComputeCount : _computeCount;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : _cpuCoreCount;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact.FromJson(__u) )) ))() : null : _customerContact;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (int?)__jsonDataStorageSizeInTbs : _dataStorageSizeInTb;} + {_dataStorageSizeInGb = If( json?.PropertyT("dataStorageSizeInGbs"), out var __jsonDataStorageSizeInGbs) ? (int?)__jsonDataStorageSizeInGbs : _dataStorageSizeInGb;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_isAutoScalingEnabled = If( json?.PropertyT("isAutoScalingEnabled"), out var __jsonIsAutoScalingEnabled) ? (bool?)__jsonIsAutoScalingEnabled : _isAutoScalingEnabled;} + {_isAutoScalingForStorageEnabled = If( json?.PropertyT("isAutoScalingForStorageEnabled"), out var __jsonIsAutoScalingForStorageEnabled) ? (bool?)__jsonIsAutoScalingForStorageEnabled : _isAutoScalingForStorageEnabled;} + {_isLocalDataGuardEnabled = If( json?.PropertyT("isLocalDataGuardEnabled"), out var __jsonIsLocalDataGuardEnabled) ? (bool?)__jsonIsLocalDataGuardEnabled : _isLocalDataGuardEnabled;} + {_isMtlsConnectionRequired = If( json?.PropertyT("isMtlsConnectionRequired"), out var __jsonIsMtlsConnectionRequired) ? (bool?)__jsonIsMtlsConnectionRequired : _isMtlsConnectionRequired;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)_licenseModel;} + {_databaseEdition = If( json?.PropertyT("databaseEdition"), out var __jsonDatabaseEdition) ? (string)__jsonDatabaseEdition : (string)_databaseEdition;} + {_localAdgAutoFailoverMaxDataLossLimit = If( json?.PropertyT("localAdgAutoFailoverMaxDataLossLimit"), out var __jsonLocalAdgAutoFailoverMaxDataLossLimit) ? (int?)__jsonLocalAdgAutoFailoverMaxDataLossLimit : _localAdgAutoFailoverMaxDataLossLimit;} + {_openMode = If( json?.PropertyT("openMode"), out var __jsonOpenMode) ? (string)__jsonOpenMode : (string)_openMode;} + {_permissionLevel = If( json?.PropertyT("permissionLevel"), out var __jsonPermissionLevel) ? (string)__jsonPermissionLevel : (string)_permissionLevel;} + {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)_role;} + {_backupRetentionPeriodInDay = If( json?.PropertyT("backupRetentionPeriodInDays"), out var __jsonBackupRetentionPeriodInDays) ? (int?)__jsonBackupRetentionPeriodInDays : _backupRetentionPeriodInDay;} + {_whitelistedIP = If( json?.PropertyT("whitelistedIps"), out var __jsonWhitelistedIps) ? If( __jsonWhitelistedIps as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _whitelistedIP;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._scheduledOperation ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._scheduledOperation.ToJson(null,serializationMode) : null, "scheduledOperations" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != this._longTermBackupSchedule ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._longTermBackupSchedule.ToJson(null,serializationMode) : null, "longTermBackupSchedule" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._adminPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._adminPassword))) : null, "adminPassword" ,container.Add ); + } + AddIf( null != (((object)this._autonomousMaintenanceScheduleType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._autonomousMaintenanceScheduleType.ToString()) : null, "autonomousMaintenanceScheduleType" ,container.Add ); + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((float)this._computeCount) : null, "computeCount" ,container.Add ); + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + if (null != this._customerContact) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._customerContact ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customerContacts",__w); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dataStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dataStorageSizeInGb) : null, "dataStorageSizeInGbs" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != this._isAutoScalingEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isAutoScalingEnabled) : null, "isAutoScalingEnabled" ,container.Add ); + AddIf( null != this._isAutoScalingForStorageEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isAutoScalingForStorageEnabled) : null, "isAutoScalingForStorageEnabled" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._peerDbId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._peerDbId.ToString()) : null, "peerDbId" ,container.Add ); + } + AddIf( null != this._isLocalDataGuardEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isLocalDataGuardEnabled) : null, "isLocalDataGuardEnabled" ,container.Add ); + AddIf( null != this._isMtlsConnectionRequired ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isMtlsConnectionRequired) : null, "isMtlsConnectionRequired" ,container.Add ); + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + AddIf( null != (((object)this._databaseEdition)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._databaseEdition.ToString()) : null, "databaseEdition" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != this._localAdgAutoFailoverMaxDataLossLimit ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._localAdgAutoFailoverMaxDataLossLimit) : null, "localAdgAutoFailoverMaxDataLossLimit" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._openMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._openMode.ToString()) : null, "openMode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._permissionLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._permissionLevel.ToString()) : null, "permissionLevel" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); + } + AddIf( null != this._backupRetentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._backupRetentionPeriodInDay) : null, "backupRetentionPeriodInDays" ,container.Add ); + if (null != this._whitelistedIP) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __s in this._whitelistedIP ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("whitelistedIps",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..10dd512d9697 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTagsTypeConverter))] + public partial class AutonomousDatabaseUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseUpdateTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTagsTypeConverter))] + public partial interface IAutonomousDatabaseUpdateTags + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..0003631cfac2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.cs new file mode 100644 index 000000000000..270f8b2251f1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class AutonomousDatabaseUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTagsInternal + { + + /// Creates an new instance. + public AutonomousDatabaseUpdateTags() + { + + } + } + /// Resource tags. + public partial interface IAutonomousDatabaseUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IAutonomousDatabaseUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.dictionary.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.dictionary.cs new file mode 100644 index 000000000000..9a47ca2ecbcf --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public partial class AutonomousDatabaseUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.json.cs new file mode 100644 index 000000000000..afdd28071fc6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class AutonomousDatabaseUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AutonomousDatabaseUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.PowerShell.cs new file mode 100644 index 000000000000..52025703bf2a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Autonomous Database Wallet File resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseWalletFileTypeConverter))] + public partial class AutonomousDatabaseWalletFile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseWalletFile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WalletFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFileInternal)this).WalletFile = (string) content.GetValueForProperty("WalletFile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFileInternal)this).WalletFile, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseWalletFile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WalletFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFileInternal)this).WalletFile = (string) content.GetValueForProperty("WalletFile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFileInternal)this).WalletFile, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseWalletFile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseWalletFile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Autonomous Database Wallet File resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseWalletFileTypeConverter))] + public partial interface IAutonomousDatabaseWalletFile + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.TypeConverter.cs new file mode 100644 index 000000000000..491739346412 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseWalletFileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseWalletFile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseWalletFile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseWalletFile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.cs new file mode 100644 index 000000000000..9600a37abe7e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database Wallet File resource model. + public partial class AutonomousDatabaseWalletFile : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFileInternal + { + + /// Backing field for property. + private string _walletFile; + + /// The base64 encoded wallet files + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string WalletFile { get => this._walletFile; set => this._walletFile = value; } + + /// Creates an new instance. + public AutonomousDatabaseWalletFile() + { + + } + } + /// Autonomous Database Wallet File resource model. + public partial interface IAutonomousDatabaseWalletFile : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The base64 encoded wallet files + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The base64 encoded wallet files", + SerializedName = @"walletFiles", + PossibleTypes = new [] { typeof(string) })] + string WalletFile { get; set; } + + } + /// Autonomous Database Wallet File resource model. + internal partial interface IAutonomousDatabaseWalletFileInternal + + { + /// The base64 encoded wallet files + string WalletFile { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.json.cs new file mode 100644 index 000000000000..74617367e089 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDatabaseWalletFile.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database Wallet File resource model. + public partial class AutonomousDatabaseWalletFile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseWalletFile(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_walletFile = If( json?.PropertyT("walletFiles"), out var __jsonWalletFiles) ? (string)__jsonWalletFiles : (string)_walletFile;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseWalletFile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDatabaseWalletFile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._walletFile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._walletFile.ToString()) : null, "walletFiles" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.PowerShell.cs new file mode 100644 index 000000000000..38601b9d09cd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.PowerShell.cs @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDbVersion resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionTypeConverter))] + public partial class AutonomousDbVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDbVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDbVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDbVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDbVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDbVersion resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionTypeConverter))] + public partial interface IAutonomousDbVersion + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.TypeConverter.cs new file mode 100644 index 000000000000..98d65e6156ec --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDbVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDbVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDbVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDbVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.cs new file mode 100644 index 000000000000..6eab676f323e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDbVersion resource definition + public partial class AutonomousDbVersion : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).DbWorkload; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsDefaultForFree { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForFree; } + + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsDefaultForPaid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForPaid; } + + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsFreeTierEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsFreeTierEnabled; } + + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsPaidEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsPaidEnabled; } + + /// Internal Acessors for DbWorkload + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal.DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).DbWorkload = value; } + + /// Internal Acessors for IsDefaultForFree + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal.IsDefaultForFree { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForFree; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForFree = value; } + + /// Internal Acessors for IsDefaultForPaid + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal.IsDefaultForPaid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForPaid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForPaid = value; } + + /// Internal Acessors for IsFreeTierEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal.IsFreeTierEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsFreeTierEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsFreeTierEnabled = value; } + + /// Internal Acessors for IsPaidEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal.IsPaidEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsPaidEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).IsPaidEnabled = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionProperties()); set { {_property = value;} } } + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionInternal.Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).Version = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)Property).Version; } + + /// Creates an new instance. + public AutonomousDbVersion() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// AutonomousDbVersion resource definition + public partial interface IAutonomousDbVersion : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; } + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software's default is free.", + SerializedName = @"isDefaultForFree", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForFree { get; } + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software's default is paid.", + SerializedName = @"isDefaultForPaid", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForPaid { get; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases.", + SerializedName = @"isFreeTierEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsFreeTierEnabled { get; } + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software has payments enabled.", + SerializedName = @"isPaidEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPaidEnabled { get; } + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Supported Autonomous Db versions.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + + } + /// AutonomousDbVersion resource definition + internal partial interface IAutonomousDbVersionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// The Autonomous Database workload type + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; set; } + /// True if this version of the Oracle Database software's default is free. + bool? IsDefaultForFree { get; set; } + /// True if this version of the Oracle Database software's default is paid. + bool? IsDefaultForPaid { get; set; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + bool? IsFreeTierEnabled { get; set; } + /// True if this version of the Oracle Database software has payments enabled. + bool? IsPaidEnabled { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties Property { get; set; } + /// Supported Autonomous Db versions. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.json.cs new file mode 100644 index 000000000000..59b4bcaf6c41 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersion.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDbVersion resource definition + public partial class AutonomousDbVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDbVersion(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDbVersion(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..1b101fd12139 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a AutonomousDbVersion list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionListResultTypeConverter))] + public partial class AutonomousDbVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDbVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDbVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDbVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDbVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a AutonomousDbVersion list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionListResultTypeConverter))] + public partial interface IAutonomousDbVersionListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..cb8b93b6b8ff --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDbVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDbVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDbVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDbVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.cs new file mode 100644 index 000000000000..6355dca95283 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDbVersion list operation. + public partial class AutonomousDbVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The AutonomousDbVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AutonomousDbVersionListResult() + { + + } + } + /// The response of a AutonomousDbVersion list operation. + public partial interface IAutonomousDbVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDbVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The AutonomousDbVersion items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a AutonomousDbVersion list operation. + internal partial interface IAutonomousDbVersionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDbVersion items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.json.cs new file mode 100644 index 000000000000..fc494265f8e4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a AutonomousDbVersion list operation. + public partial class AutonomousDbVersionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDbVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersion.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDbVersionListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..1f4ca602b45a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// AutonomousDbVersion resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionPropertiesTypeConverter))] + public partial class AutonomousDbVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDbVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDbVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).DbWorkload = (string) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).DbWorkload, global::System.Convert.ToString); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDbVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDbVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// AutonomousDbVersion resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionPropertiesTypeConverter))] + public partial interface IAutonomousDbVersionProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.TypeConverter.cs new file mode 100644 index 000000000000..862ebc36eb31 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDbVersionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDbVersionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDbVersionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDbVersionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.cs new file mode 100644 index 000000000000..c7d2519af0b5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDbVersion resource model + public partial class AutonomousDbVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal + { + + /// Backing field for property. + private string _dbWorkload; + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbWorkload { get => this._dbWorkload; } + + /// Backing field for property. + private bool? _isDefaultForFree; + + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsDefaultForFree { get => this._isDefaultForFree; } + + /// Backing field for property. + private bool? _isDefaultForPaid; + + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsDefaultForPaid { get => this._isDefaultForPaid; } + + /// Backing field for property. + private bool? _isFreeTierEnabled; + + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsFreeTierEnabled { get => this._isFreeTierEnabled; } + + /// Backing field for property. + private bool? _isPaidEnabled; + + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsPaidEnabled { get => this._isPaidEnabled; } + + /// Internal Acessors for DbWorkload + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal.DbWorkload { get => this._dbWorkload; set { {_dbWorkload = value;} } } + + /// Internal Acessors for IsDefaultForFree + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal.IsDefaultForFree { get => this._isDefaultForFree; set { {_isDefaultForFree = value;} } } + + /// Internal Acessors for IsDefaultForPaid + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal.IsDefaultForPaid { get => this._isDefaultForPaid; set { {_isDefaultForPaid = value;} } } + + /// Internal Acessors for IsFreeTierEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal.IsFreeTierEnabled { get => this._isFreeTierEnabled; set { {_isFreeTierEnabled = value;} } } + + /// Internal Acessors for IsPaidEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal.IsPaidEnabled { get => this._isPaidEnabled; set { {_isPaidEnabled = value;} } } + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionPropertiesInternal.Version { get => this._version; set { {_version = value;} } } + + /// Backing field for property. + private string _version; + + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Version { get => this._version; } + + /// Creates an new instance. + public AutonomousDbVersionProperties() + { + + } + } + /// AutonomousDbVersion resource model + public partial interface IAutonomousDbVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; } + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software's default is free.", + SerializedName = @"isDefaultForFree", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForFree { get; } + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software's default is paid.", + SerializedName = @"isDefaultForPaid", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForPaid { get; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases.", + SerializedName = @"isFreeTierEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsFreeTierEnabled { get; } + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"True if this version of the Oracle Database software has payments enabled.", + SerializedName = @"isPaidEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPaidEnabled { get; } + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Supported Autonomous Db versions.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + + } + /// AutonomousDbVersion resource model + internal partial interface IAutonomousDbVersionPropertiesInternal + + { + /// The Autonomous Database workload type + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + string DbWorkload { get; set; } + /// True if this version of the Oracle Database software's default is free. + bool? IsDefaultForFree { get; set; } + /// True if this version of the Oracle Database software's default is paid. + bool? IsDefaultForPaid { get; set; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + bool? IsFreeTierEnabled { get; set; } + /// True if this version of the Oracle Database software has payments enabled. + bool? IsPaidEnabled { get; set; } + /// Supported Autonomous Db versions. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.json.cs new file mode 100644 index 000000000000..6ae09383882e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/AutonomousDbVersionProperties.json.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// AutonomousDbVersion resource model + public partial class AutonomousDbVersionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDbVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + {_dbWorkload = If( json?.PropertyT("dbWorkload"), out var __jsonDbWorkload) ? (string)__jsonDbWorkload : (string)_dbWorkload;} + {_isDefaultForFree = If( json?.PropertyT("isDefaultForFree"), out var __jsonIsDefaultForFree) ? (bool?)__jsonIsDefaultForFree : _isDefaultForFree;} + {_isDefaultForPaid = If( json?.PropertyT("isDefaultForPaid"), out var __jsonIsDefaultForPaid) ? (bool?)__jsonIsDefaultForPaid : _isDefaultForPaid;} + {_isFreeTierEnabled = If( json?.PropertyT("isFreeTierEnabled"), out var __jsonIsFreeTierEnabled) ? (bool?)__jsonIsFreeTierEnabled : _isFreeTierEnabled;} + {_isPaidEnabled = If( json?.PropertyT("isPaidEnabled"), out var __jsonIsPaidEnabled) ? (bool?)__jsonIsPaidEnabled : _isPaidEnabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AutonomousDbVersionProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._dbWorkload)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbWorkload.ToString()) : null, "dbWorkload" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDefaultForFree ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isDefaultForFree) : null, "isDefaultForFree" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDefaultForPaid ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isDefaultForPaid) : null, "isDefaultForPaid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isFreeTierEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isFreeTierEnabled) : null, "isFreeTierEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isPaidEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isPaidEnabled) : null, "isPaidEnabled" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.PowerShell.cs new file mode 100644 index 000000000000..493808bfc80c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Cloud Account Details model + [System.ComponentModel.TypeConverter(typeof(CloudAccountDetailsTypeConverter))] + public partial class CloudAccountDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudAccountDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CloudAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountName = (string) content.GetValueForProperty("CloudAccountName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountName, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountHomeRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion = (string) content.GetValueForProperty("CloudAccountHomeRegion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudAccountDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CloudAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountName = (string) content.GetValueForProperty("CloudAccountName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountName, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountHomeRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion = (string) content.GetValueForProperty("CloudAccountHomeRegion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudAccountDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudAccountDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Cloud Account Details model + [System.ComponentModel.TypeConverter(typeof(CloudAccountDetailsTypeConverter))] + public partial interface ICloudAccountDetails + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.TypeConverter.cs new file mode 100644 index 000000000000..412cdc4a6307 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudAccountDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudAccountDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudAccountDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudAccountDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.cs new file mode 100644 index 000000000000..e72ba60dbf94 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Cloud Account Details model + public partial class CloudAccountDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal + { + + /// Backing field for property. + private string _cloudAccountHomeRegion; + + /// Cloud Account Home region + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CloudAccountHomeRegion { get => this._cloudAccountHomeRegion; } + + /// Backing field for property. + private string _cloudAccountName; + + /// Cloud Account name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CloudAccountName { get => this._cloudAccountName; } + + /// Internal Acessors for CloudAccountHomeRegion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal.CloudAccountHomeRegion { get => this._cloudAccountHomeRegion; set { {_cloudAccountHomeRegion = value;} } } + + /// Internal Acessors for CloudAccountName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetailsInternal.CloudAccountName { get => this._cloudAccountName; set { {_cloudAccountName = value;} } } + + /// Creates an new instance. + public CloudAccountDetails() + { + + } + } + /// Cloud Account Details model + public partial interface ICloudAccountDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Cloud Account Home region + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud Account Home region", + SerializedName = @"cloudAccountHomeRegion", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountHomeRegion { get; } + /// Cloud Account name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud Account name", + SerializedName = @"cloudAccountName", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountName { get; } + + } + /// Cloud Account Details model + internal partial interface ICloudAccountDetailsInternal + + { + /// Cloud Account Home region + string CloudAccountHomeRegion { get; set; } + /// Cloud Account name + string CloudAccountName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.json.cs new file mode 100644 index 000000000000..910081648997 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudAccountDetails.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Cloud Account Details model + public partial class CloudAccountDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudAccountDetails(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_cloudAccountName = If( json?.PropertyT("cloudAccountName"), out var __jsonCloudAccountName) ? (string)__jsonCloudAccountName : (string)_cloudAccountName;} + {_cloudAccountHomeRegion = If( json?.PropertyT("cloudAccountHomeRegion"), out var __jsonCloudAccountHomeRegion) ? (string)__jsonCloudAccountHomeRegion : (string)_cloudAccountHomeRegion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudAccountDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudAccountDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._cloudAccountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloudAccountName.ToString()) : null, "cloudAccountName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._cloudAccountHomeRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloudAccountHomeRegion.ToString()) : null, "cloudAccountHomeRegion" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.PowerShell.cs new file mode 100644 index 000000000000..6095f9bc9bc2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.PowerShell.cs @@ -0,0 +1,628 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// CloudExadataInfrastructure resource definition + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureTypeConverter))] + public partial class CloudExadataInfrastructure + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructure(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructurePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructure(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructurePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructure(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructure(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CloudExadataInfrastructure resource definition + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureTypeConverter))] + public partial interface ICloudExadataInfrastructure + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.TypeConverter.cs new file mode 100644 index 000000000000..c8b78b42999c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructure.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructure.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructure.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.cs new file mode 100644 index 000000000000..c91a7d9716d4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.cs @@ -0,0 +1,1101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudExadataInfrastructure resource definition + public partial class CloudExadataInfrastructure : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource(); + + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? ActivatedStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ActivatedStorageCount; } + + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AdditionalStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).AdditionalStorageCount; } + + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).AvailableStorageSizeInGb; } + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ComputeCount = value ?? default(int); } + + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).CpuCount; } + + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DataStorageSizeInTb; } + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DbNodeStorageSizeInGb; } + + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DbServerVersion; } + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DisplayName = value ?? null; } + + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedDbServerPatchingTime; } + + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime; } + + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedStorageServerPatchingTime; } + + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeTotalEstimatedPatchingTime; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id; } + + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LastMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LastMaintenanceRunId; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleDetail; } + + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleState; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowDaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowDaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowHoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowHoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowMonth = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPatchingMode = value ?? null; } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPreference; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPreference = value ?? null; } + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth = value ?? null /* arrayOf */; } + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxCpuCount; } + + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? MaxDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDataStorageInTb; } + + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaxDbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDbNodeStorageSizeInGb; } + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxMemoryInGb; } + + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MemorySizeInGb; } + + /// Internal Acessors for ActivatedStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.ActivatedStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ActivatedStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ActivatedStorageCount = value; } + + /// Internal Acessors for AdditionalStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.AdditionalStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).AdditionalStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).AdditionalStorageCount = value; } + + /// Internal Acessors for AvailableStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.AvailableStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).AvailableStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).AvailableStorageSizeInGb = value; } + + /// Internal Acessors for CpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.CpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).CpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).CpuCount = value; } + + /// Internal Acessors for DataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DataStorageSizeInTb = value; } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DbNodeStorageSizeInGb = value; } + + /// Internal Acessors for DbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.DbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DbServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).DbServerVersion = value; } + + /// Internal Acessors for EstimatedPatchingTime + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.EstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedDbServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedDbServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedDbServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedStorageServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedStorageServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeTotalEstimatedPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeTotalEstimatedPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeTotalEstimatedPatchingTime = value; } + + /// Internal Acessors for LastMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.LastMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LastMaintenanceRunId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LastMaintenanceRunId = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MaintenanceWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindow = value; } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxCpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxCpuCount = value; } + + /// Internal Acessors for MaxDataStorageInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MaxDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDataStorageInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDataStorageInTb = value; } + + /// Internal Acessors for MaxDbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MaxDbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDbNodeStorageSizeInGb = value; } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxMemoryInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MaxMemoryInGb = value; } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MemorySizeInGb = value; } + + /// Internal Acessors for MonthlyDbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MonthlyDbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyDbServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyDbServerVersion = value; } + + /// Internal Acessors for MonthlyStorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.MonthlyStorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyStorageServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyStorageServerVersion = value; } + + /// Internal Acessors for NextMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.NextMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).NextMaintenanceRunId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).NextMaintenanceRunId = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for StorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.StorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerVersion = value; } + + /// Internal Acessors for TimeCreated + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for TotalStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureInternal.TotalStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).TotalStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).TotalStorageSizeInGb = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type = value; } + + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MonthlyDbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyDbServerVersion; } + + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MonthlyStorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyStorageServerVersion; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name; } + + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string NextMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).NextMaintenanceRunId; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).OciUrl; } + + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureProperties()); set => this._property = value; } + + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).Shape = value ?? null; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? StorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).StorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).StorageCount = value ?? default(int); } + + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string StorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerVersion; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).TimeCreated; } + + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? TotalStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)Property).TotalStorageSizeInGb; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type; } + + /// Backing field for property. + private System.Collections.Generic.List _zone; + + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public CloudExadataInfrastructure() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// CloudExadataInfrastructure resource definition + public partial interface ICloudExadataInfrastructure : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The requested number of additional storage servers activated for the Exadata infrastructure.", + SerializedName = @"activatedStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? ActivatedStorageCount { get; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The requested number of additional storage servers for the Exadata infrastructure.", + SerializedName = @"additionalStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? AdditionalStorageCount { get; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"availableStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableStorageSizeInGb { get; } + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of CPU cores allocated.", + SerializedName = @"cpuCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCount { get; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The software version of the database servers (dom0) in the Exadata infrastructure.", + SerializedName = @"dbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string DbServerVersion { get; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for database server patching.", + SerializedName = @"estimatedDbServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; } + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for network switch patching.", + SerializedName = @"estimatedNetworkSwitchesPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; } + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for storage server patching.", + SerializedName = @"estimatedStorageServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; } + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated total time required in minutes for all patching operations.", + SerializedName = @"totalEstimatedPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; } + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the last maintenance run.", + SerializedName = @"lastMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string LastMaintenanceRunId { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudExadataInfrastructure lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total available DATA disk group size.", + SerializedName = @"maxDataStorageInTbs", + PossibleTypes = new [] { typeof(double) })] + double? MaxDataStorageInTb { get; } + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total local node storage available in GBs.", + SerializedName = @"maxDbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageSizeInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The memory allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Monthly Db Server version", + SerializedName = @"monthlyDbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyDbServerVersion { get; } + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Monthly Storage Server version", + SerializedName = @"monthlyStorageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyStorageServerVersion { get; } + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the next maintenance run.", + SerializedName = @"nextMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string NextMaintenanceRunId { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Exadata infra ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudExadataInfrastructure provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The model name of the cloud Exadata infrastructure resource.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The software version of the storage servers (cells) in the Exadata infrastructure.", + SerializedName = @"storageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string StorageServerVersion { get; } + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the cloud Exadata infrastructure resource was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(string) })] + string TimeCreated { get; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"totalStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? TotalStorageSizeInGb { get; } + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Zone { get; set; } + + } + /// CloudExadataInfrastructure resource definition + internal partial interface ICloudExadataInfrastructureInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + int? ActivatedStorageCount { get; set; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + int? AdditionalStorageCount { get; set; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? AvailableStorageSizeInGb { get; set; } + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// The total number of CPU cores allocated. + int? CpuCount { get; set; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + System.Collections.Generic.List CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + string DbServerVersion { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime EstimatedPatchingTime { get; set; } + /// The estimated time required in minutes for database server patching. + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; set; } + /// The estimated time required in minutes for network switch patching. + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; set; } + /// The estimated time required in minutes for storage server patching. + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; set; } + /// The estimated total time required in minutes for all patching operations. + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; set; } + /// The OCID of the last maintenance run. + string LastMaintenanceRunId { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudExadataInfrastructure lifecycle state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total available DATA disk group size. + double? MaxDataStorageInTb { get; set; } + /// The total local node storage available in GBs. + int? MaxDbNodeStorageSizeInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The memory allocated in GBs. + int? MemorySizeInGb { get; set; } + /// Monthly Db Server version + string MonthlyDbServerVersion { get; set; } + /// Monthly Storage Server version + string MonthlyStorageServerVersion { get; set; } + /// The OCID of the next maintenance run. + string NextMaintenanceRunId { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Exadata infra ocid + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties Property { get; set; } + /// CloudExadataInfrastructure provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// The model name of the cloud Exadata infrastructure resource. + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + string StorageServerVersion { get; set; } + /// The date and time the cloud Exadata infrastructure resource was created. + string TimeCreated { get; set; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? TotalStorageSizeInGb { get; set; } + /// CloudExadataInfrastructure zones + System.Collections.Generic.List Zone { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.json.cs new file mode 100644 index 000000000000..eeb1fd873467 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructure.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudExadataInfrastructure resource definition + public partial class CloudExadataInfrastructure + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructure(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureProperties.FromJson(__jsonProperties) : _property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _zone;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudExadataInfrastructure(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.PowerShell.cs new file mode 100644 index 000000000000..f851d79a2ec3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a CloudExadataInfrastructure list operation. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureListResultTypeConverter))] + public partial class CloudExadataInfrastructureListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a CloudExadataInfrastructure list operation. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureListResultTypeConverter))] + public partial interface ICloudExadataInfrastructureListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.TypeConverter.cs new file mode 100644 index 000000000000..f748d7a96b18 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.cs new file mode 100644 index 000000000000..cdb3f870d12f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a CloudExadataInfrastructure list operation. + public partial class CloudExadataInfrastructureListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The CloudExadataInfrastructure items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public CloudExadataInfrastructureListResult() + { + + } + } + /// The response of a CloudExadataInfrastructure list operation. + public partial interface ICloudExadataInfrastructureListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The CloudExadataInfrastructure items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The CloudExadataInfrastructure items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a CloudExadataInfrastructure list operation. + internal partial interface ICloudExadataInfrastructureListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The CloudExadataInfrastructure items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.json.cs new file mode 100644 index 000000000000..fa64048efbb9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureListResult.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a CloudExadataInfrastructure list operation. + public partial class CloudExadataInfrastructureListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.PowerShell.cs new file mode 100644 index 000000000000..e660e1399d28 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.PowerShell.cs @@ -0,0 +1,518 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// CloudExadataInfrastructure resource model + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructurePropertiesTypeConverter))] + public partial class CloudExadataInfrastructureProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CloudExadataInfrastructure resource model + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructurePropertiesTypeConverter))] + public partial interface ICloudExadataInfrastructureProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.TypeConverter.cs new file mode 100644 index 000000000000..e215479b845f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructurePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.cs new file mode 100644 index 000000000000..e4c1be0cd1db --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.cs @@ -0,0 +1,1085 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudExadataInfrastructure resource model + public partial class CloudExadataInfrastructureProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal + { + + /// Backing field for property. + private int? _activatedStorageCount; + + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? ActivatedStorageCount { get => this._activatedStorageCount; } + + /// Backing field for property. + private int? _additionalStorageCount; + + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AdditionalStorageCount { get => this._additionalStorageCount; } + + /// Backing field for property. + private int? _availableStorageSizeInGb; + + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableStorageSizeInGb { get => this._availableStorageSizeInGb; } + + /// Backing field for property. + private int? _computeCount; + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private int? _cpuCount; + + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CpuCount { get => this._cpuCount; } + + /// Backing field for property. + private System.Collections.Generic.List _customerContact; + + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private double? _dataStorageSizeInTb; + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? DataStorageSizeInTb { get => this._dataStorageSizeInTb; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; } + + /// Backing field for property. + private string _dbServerVersion; + + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbServerVersion { get => this._dbServerVersion; } + + /// Backing field for property. + private string _displayName; + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime _estimatedPatchingTime; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime EstimatedPatchingTime { get => (this._estimatedPatchingTime = this._estimatedPatchingTime ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTime()); } + + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedDbServerPatchingTime; } + + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedNetworkSwitchesPatchingTime; } + + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedStorageServerPatchingTime; } + + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).TotalEstimatedPatchingTime; } + + /// Backing field for property. + private string _lastMaintenanceRunId; + + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LastMaintenanceRunId { get => this._lastMaintenanceRunId; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private string _lifecycleState; + + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow _maintenanceWindow; + + /// maintenanceWindow property + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow()); set => this._maintenanceWindow = value; } + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Month; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Month = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode = value ?? null; } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Preference; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Preference = value ?? null; } + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth = value ?? null /* arrayOf */; } + + /// Backing field for property. + private int? _maxCpuCount; + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaxCpuCount { get => this._maxCpuCount; } + + /// Backing field for property. + private double? _maxDataStorageInTb; + + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? MaxDataStorageInTb { get => this._maxDataStorageInTb; } + + /// Backing field for property. + private int? _maxDbNodeStorageSizeInGb; + + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaxDbNodeStorageSizeInGb { get => this._maxDbNodeStorageSizeInGb; } + + /// Backing field for property. + private int? _maxMemoryInGb; + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaxMemoryInGb { get => this._maxMemoryInGb; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; } + + /// Internal Acessors for ActivatedStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.ActivatedStorageCount { get => this._activatedStorageCount; set { {_activatedStorageCount = value;} } } + + /// Internal Acessors for AdditionalStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.AdditionalStorageCount { get => this._additionalStorageCount; set { {_additionalStorageCount = value;} } } + + /// Internal Acessors for AvailableStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.AvailableStorageSizeInGb { get => this._availableStorageSizeInGb; set { {_availableStorageSizeInGb = value;} } } + + /// Internal Acessors for CpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.CpuCount { get => this._cpuCount; set { {_cpuCount = value;} } } + + /// Internal Acessors for DataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.DataStorageSizeInTb { get => this._dataStorageSizeInTb; set { {_dataStorageSizeInTb = value;} } } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set { {_dbNodeStorageSizeInGb = value;} } } + + /// Internal Acessors for DbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.DbServerVersion { get => this._dbServerVersion; set { {_dbServerVersion = value;} } } + + /// Internal Acessors for EstimatedPatchingTime + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTime { get => (this._estimatedPatchingTime = this._estimatedPatchingTime ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTime()); set { {_estimatedPatchingTime = value;} } } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedDbServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedDbServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedDbServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedNetworkSwitchesPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedNetworkSwitchesPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedStorageServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedStorageServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedStorageServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeTotalEstimatedPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).TotalEstimatedPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).TotalEstimatedPatchingTime = value; } + + /// Internal Acessors for LastMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.LastMaintenanceRunId { get => this._lastMaintenanceRunId; set { {_lastMaintenanceRunId = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow()); set { {_maintenanceWindow = value;} } } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MaxCpuCount { get => this._maxCpuCount; set { {_maxCpuCount = value;} } } + + /// Internal Acessors for MaxDataStorageInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MaxDataStorageInTb { get => this._maxDataStorageInTb; set { {_maxDataStorageInTb = value;} } } + + /// Internal Acessors for MaxDbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MaxDbNodeStorageSizeInGb { get => this._maxDbNodeStorageSizeInGb; set { {_maxDbNodeStorageSizeInGb = value;} } } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MaxMemoryInGb { get => this._maxMemoryInGb; set { {_maxMemoryInGb = value;} } } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MemorySizeInGb { get => this._memorySizeInGb; set { {_memorySizeInGb = value;} } } + + /// Internal Acessors for MonthlyDbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MonthlyDbServerVersion { get => this._monthlyDbServerVersion; set { {_monthlyDbServerVersion = value;} } } + + /// Internal Acessors for MonthlyStorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.MonthlyStorageServerVersion { get => this._monthlyStorageServerVersion; set { {_monthlyStorageServerVersion = value;} } } + + /// Internal Acessors for NextMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.NextMaintenanceRunId { get => this._nextMaintenanceRunId; set { {_nextMaintenanceRunId = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for StorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.StorageServerVersion { get => this._storageServerVersion; set { {_storageServerVersion = value;} } } + + /// Internal Acessors for TimeCreated + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for TotalStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructurePropertiesInternal.TotalStorageSizeInGb { get => this._totalStorageSizeInGb; set { {_totalStorageSizeInGb = value;} } } + + /// Backing field for property. + private string _monthlyDbServerVersion; + + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string MonthlyDbServerVersion { get => this._monthlyDbServerVersion; } + + /// Backing field for property. + private string _monthlyStorageServerVersion; + + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string MonthlyStorageServerVersion { get => this._monthlyStorageServerVersion; } + + /// Backing field for property. + private string _nextMaintenanceRunId; + + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextMaintenanceRunId { get => this._nextMaintenanceRunId; } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _provisioningState; + + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _shape; + + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Shape { get => this._shape; set => this._shape = value; } + + /// Backing field for property. + private int? _storageCount; + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? StorageCount { get => this._storageCount; set => this._storageCount = value; } + + /// Backing field for property. + private string _storageServerVersion; + + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string StorageServerVersion { get => this._storageServerVersion; } + + /// Backing field for property. + private string _timeCreated; + + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private int? _totalStorageSizeInGb; + + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? TotalStorageSizeInGb { get => this._totalStorageSizeInGb; } + + /// Creates an new instance. + public CloudExadataInfrastructureProperties() + { + + } + } + /// CloudExadataInfrastructure resource model + public partial interface ICloudExadataInfrastructureProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The requested number of additional storage servers activated for the Exadata infrastructure.", + SerializedName = @"activatedStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? ActivatedStorageCount { get; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The requested number of additional storage servers for the Exadata infrastructure.", + SerializedName = @"additionalStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? AdditionalStorageCount { get; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"availableStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableStorageSizeInGb { get; } + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of CPU cores allocated.", + SerializedName = @"cpuCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCount { get; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The software version of the database servers (dom0) in the Exadata infrastructure.", + SerializedName = @"dbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string DbServerVersion { get; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for database server patching.", + SerializedName = @"estimatedDbServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; } + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for network switch patching.", + SerializedName = @"estimatedNetworkSwitchesPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; } + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for storage server patching.", + SerializedName = @"estimatedStorageServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; } + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated total time required in minutes for all patching operations.", + SerializedName = @"totalEstimatedPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; } + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the last maintenance run.", + SerializedName = @"lastMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string LastMaintenanceRunId { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudExadataInfrastructure lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total available DATA disk group size.", + SerializedName = @"maxDataStorageInTbs", + PossibleTypes = new [] { typeof(double) })] + double? MaxDataStorageInTb { get; } + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total local node storage available in GBs.", + SerializedName = @"maxDbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageSizeInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The memory allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Monthly Db Server version", + SerializedName = @"monthlyDbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyDbServerVersion { get; } + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Monthly Storage Server version", + SerializedName = @"monthlyStorageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyStorageServerVersion { get; } + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the next maintenance run.", + SerializedName = @"nextMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string NextMaintenanceRunId { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Exadata infra ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudExadataInfrastructure provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The model name of the cloud Exadata infrastructure resource.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The software version of the storage servers (cells) in the Exadata infrastructure.", + SerializedName = @"storageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string StorageServerVersion { get; } + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time the cloud Exadata infrastructure resource was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(string) })] + string TimeCreated { get; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"totalStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? TotalStorageSizeInGb { get; } + + } + /// CloudExadataInfrastructure resource model + internal partial interface ICloudExadataInfrastructurePropertiesInternal + + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + int? ActivatedStorageCount { get; set; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + int? AdditionalStorageCount { get; set; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? AvailableStorageSizeInGb { get; set; } + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// The total number of CPU cores allocated. + int? CpuCount { get; set; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + System.Collections.Generic.List CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + string DbServerVersion { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime EstimatedPatchingTime { get; set; } + /// The estimated time required in minutes for database server patching. + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; set; } + /// The estimated time required in minutes for network switch patching. + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; set; } + /// The estimated time required in minutes for storage server patching. + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; set; } + /// The estimated total time required in minutes for all patching operations. + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; set; } + /// The OCID of the last maintenance run. + string LastMaintenanceRunId { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudExadataInfrastructure lifecycle state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total available DATA disk group size. + double? MaxDataStorageInTb { get; set; } + /// The total local node storage available in GBs. + int? MaxDbNodeStorageSizeInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The memory allocated in GBs. + int? MemorySizeInGb { get; set; } + /// Monthly Db Server version + string MonthlyDbServerVersion { get; set; } + /// Monthly Storage Server version + string MonthlyStorageServerVersion { get; set; } + /// The OCID of the next maintenance run. + string NextMaintenanceRunId { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Exadata infra ocid + string Ocid { get; set; } + /// CloudExadataInfrastructure provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// The model name of the cloud Exadata infrastructure resource. + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + string StorageServerVersion { get; set; } + /// The date and time the cloud Exadata infrastructure resource was created. + string TimeCreated { get; set; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? TotalStorageSizeInGb { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.json.cs new file mode 100644 index 000000000000..83f76a152479 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureProperties.json.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudExadataInfrastructure resource model + public partial class CloudExadataInfrastructureProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_maintenanceWindow = If( json?.PropertyT("maintenanceWindow"), out var __jsonMaintenanceWindow) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow.FromJson(__jsonMaintenanceWindow) : _maintenanceWindow;} + {_estimatedPatchingTime = If( json?.PropertyT("estimatedPatchingTime"), out var __jsonEstimatedPatchingTime) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.EstimatedPatchingTime.FromJson(__jsonEstimatedPatchingTime) : _estimatedPatchingTime;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (int?)__jsonComputeCount : _computeCount;} + {_storageCount = If( json?.PropertyT("storageCount"), out var __jsonStorageCount) ? (int?)__jsonStorageCount : _storageCount;} + {_totalStorageSizeInGb = If( json?.PropertyT("totalStorageSizeInGbs"), out var __jsonTotalStorageSizeInGbs) ? (int?)__jsonTotalStorageSizeInGbs : _totalStorageSizeInGb;} + {_availableStorageSizeInGb = If( json?.PropertyT("availableStorageSizeInGbs"), out var __jsonAvailableStorageSizeInGbs) ? (int?)__jsonAvailableStorageSizeInGbs : _availableStorageSizeInGb;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? (string)__jsonTimeCreated : (string)_timeCreated;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact.FromJson(__u) )) ))() : null : _customerContact;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)_shape;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)_ociUrl;} + {_cpuCount = If( json?.PropertyT("cpuCount"), out var __jsonCpuCount) ? (int?)__jsonCpuCount : _cpuCount;} + {_maxCpuCount = If( json?.PropertyT("maxCpuCount"), out var __jsonMaxCpuCount) ? (int?)__jsonMaxCpuCount : _maxCpuCount;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : _memorySizeInGb;} + {_maxMemoryInGb = If( json?.PropertyT("maxMemoryInGbs"), out var __jsonMaxMemoryInGbs) ? (int?)__jsonMaxMemoryInGbs : _maxMemoryInGb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : _dbNodeStorageSizeInGb;} + {_maxDbNodeStorageSizeInGb = If( json?.PropertyT("maxDbNodeStorageSizeInGbs"), out var __jsonMaxDbNodeStorageSizeInGbs) ? (int?)__jsonMaxDbNodeStorageSizeInGbs : _maxDbNodeStorageSizeInGb;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (double?)__jsonDataStorageSizeInTbs : _dataStorageSizeInTb;} + {_maxDataStorageInTb = If( json?.PropertyT("maxDataStorageInTbs"), out var __jsonMaxDataStorageInTbs) ? (double?)__jsonMaxDataStorageInTbs : _maxDataStorageInTb;} + {_dbServerVersion = If( json?.PropertyT("dbServerVersion"), out var __jsonDbServerVersion) ? (string)__jsonDbServerVersion : (string)_dbServerVersion;} + {_storageServerVersion = If( json?.PropertyT("storageServerVersion"), out var __jsonStorageServerVersion) ? (string)__jsonStorageServerVersion : (string)_storageServerVersion;} + {_activatedStorageCount = If( json?.PropertyT("activatedStorageCount"), out var __jsonActivatedStorageCount) ? (int?)__jsonActivatedStorageCount : _activatedStorageCount;} + {_additionalStorageCount = If( json?.PropertyT("additionalStorageCount"), out var __jsonAdditionalStorageCount) ? (int?)__jsonAdditionalStorageCount : _additionalStorageCount;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_lastMaintenanceRunId = If( json?.PropertyT("lastMaintenanceRunId"), out var __jsonLastMaintenanceRunId) ? (string)__jsonLastMaintenanceRunId : (string)_lastMaintenanceRunId;} + {_nextMaintenanceRunId = If( json?.PropertyT("nextMaintenanceRunId"), out var __jsonNextMaintenanceRunId) ? (string)__jsonNextMaintenanceRunId : (string)_nextMaintenanceRunId;} + {_monthlyDbServerVersion = If( json?.PropertyT("monthlyDbServerVersion"), out var __jsonMonthlyDbServerVersion) ? (string)__jsonMonthlyDbServerVersion : (string)_monthlyDbServerVersion;} + {_monthlyStorageServerVersion = If( json?.PropertyT("monthlyStorageServerVersion"), out var __jsonMonthlyStorageServerVersion) ? (string)__jsonMonthlyStorageServerVersion : (string)_monthlyStorageServerVersion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._maintenanceWindow ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._maintenanceWindow.ToJson(null,serializationMode) : null, "maintenanceWindow" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._estimatedPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._estimatedPatchingTime.ToJson(null,serializationMode) : null, "estimatedPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._computeCount) : null, "computeCount" ,container.Add ); + AddIf( null != this._storageCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._storageCount) : null, "storageCount" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._totalStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._totalStorageSizeInGb) : null, "totalStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableStorageSizeInGb) : null, "availableStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._timeCreated)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated.ToString()) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (null != this._customerContact) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._customerContact ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customerContacts",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._cpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._cpuCount) : null, "cpuCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxCpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maxCpuCount) : null, "maxCpuCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxMemoryInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maxMemoryInGb) : null, "maxMemoryInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxDbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maxDbNodeStorageSizeInGb) : null, "maxDbNodeStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxDataStorageInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._maxDataStorageInTb) : null, "maxDataStorageInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._dbServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbServerVersion.ToString()) : null, "dbServerVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._storageServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._storageServerVersion.ToString()) : null, "storageServerVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._activatedStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._activatedStorageCount) : null, "activatedStorageCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._additionalStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._additionalStorageCount) : null, "additionalStorageCount" ,container.Add ); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lastMaintenanceRunId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lastMaintenanceRunId.ToString()) : null, "lastMaintenanceRunId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextMaintenanceRunId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextMaintenanceRunId.ToString()) : null, "nextMaintenanceRunId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._monthlyDbServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._monthlyDbServerVersion.ToString()) : null, "monthlyDbServerVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._monthlyStorageServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._monthlyStorageServerVersion.ToString()) : null, "monthlyStorageServerVersion" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.PowerShell.cs new file mode 100644 index 000000000000..f7cf65e6463b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.PowerShell.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The type used for update operations of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTypeConverter))] + public partial class CloudExadataInfrastructureUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Zone = (System.Collections.Generic.List) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Zone, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTypeConverter))] + public partial interface ICloudExadataInfrastructureUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.TypeConverter.cs new file mode 100644 index 000000000000..258240556d65 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.cs new file mode 100644 index 000000000000..9c80f78fd548 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.cs @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal + { + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).ComputeCount = value ?? default(int); } + + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowDaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowDaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowHoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowHoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowMonth = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPatchingMode = value ?? null; } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPreference; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPreference = value ?? null; } + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth = value ?? null /* arrayOf */; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal.MaintenanceWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindow = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties _property; + + /// The updatable properties of the CloudExadataInfrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateProperties()); set => this._property = value; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? StorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).StorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).StorageCount = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateTags()); set => this._tag = value; } + + /// Backing field for property. + private System.Collections.Generic.List _zone; + + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public CloudExadataInfrastructureUpdate() + { + + } + } + /// The type used for update operations of the CloudExadataInfrastructure. + public partial interface ICloudExadataInfrastructureUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags Tag { get; set; } + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Zone { get; set; } + + } + /// The type used for update operations of the CloudExadataInfrastructure. + internal partial interface ICloudExadataInfrastructureUpdateInternal + + { + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + System.Collections.Generic.List CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The updatable properties of the CloudExadataInfrastructure. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties Property { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags Tag { get; set; } + /// CloudExadataInfrastructure zones + System.Collections.Generic.List Zone { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.json.cs new file mode 100644 index 000000000000..920652971aec --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdate.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateProperties.FromJson(__jsonProperties) : _property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _zone;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateTags.FromJson(__jsonTags) : _tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..7c4705f81ebb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.PowerShell.cs @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The updatable properties of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdatePropertiesTypeConverter))] + public partial class CloudExadataInfrastructureUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact = (System.Collections.Generic.List) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference = (string) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode = (string) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdatePropertiesTypeConverter))] + public partial interface ICloudExadataInfrastructureUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..93b273265303 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.cs new file mode 100644 index 000000000000..e031d088d0e8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.cs @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal + { + + /// Backing field for property. + private int? _computeCount; + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private System.Collections.Generic.List _customerContact; + + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private string _displayName; + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow _maintenanceWindow; + + /// maintenanceWindow property + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow()); set => this._maintenanceWindow = value; } + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Month; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Month = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode = value ?? null; } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Preference; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).Preference = value ?? null; } + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth = value ?? null /* arrayOf */; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdatePropertiesInternal.MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow()); set { {_maintenanceWindow = value;} } } + + /// Backing field for property. + private int? _storageCount; + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? StorageCount { get => this._storageCount; set => this._storageCount = value; } + + /// + /// Creates an new instance. + /// + public CloudExadataInfrastructureUpdateProperties() + { + + } + } + /// The updatable properties of the CloudExadataInfrastructure. + public partial interface ICloudExadataInfrastructureUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + System.Collections.Generic.List CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + + } + /// The updatable properties of the CloudExadataInfrastructure. + internal partial interface ICloudExadataInfrastructureUpdatePropertiesInternal + + { + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + System.Collections.Generic.List CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowDaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + System.Collections.Generic.List MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + System.Collections.Generic.List MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string MaintenanceWindowPreference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + System.Collections.Generic.List MaintenanceWindowWeeksOfMonth { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.json.cs new file mode 100644 index 000000000000..dc801819f01c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateProperties.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_maintenanceWindow = If( json?.PropertyT("maintenanceWindow"), out var __jsonMaintenanceWindow) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MaintenanceWindow.FromJson(__jsonMaintenanceWindow) : _maintenanceWindow;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (int?)__jsonComputeCount : _computeCount;} + {_storageCount = If( json?.PropertyT("storageCount"), out var __jsonStorageCount) ? (int?)__jsonStorageCount : _storageCount;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact.FromJson(__u) )) ))() : null : _customerContact;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._maintenanceWindow ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._maintenanceWindow.ToJson(null,serializationMode) : null, "maintenanceWindow" ,container.Add ); + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._computeCount) : null, "computeCount" ,container.Add ); + AddIf( null != this._storageCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._storageCount) : null, "storageCount" ,container.Add ); + if (null != this._customerContact) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._customerContact ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customerContacts",__w); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..34bbfa8974ea --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTagsTypeConverter))] + public partial class CloudExadataInfrastructureUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureUpdateTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTagsTypeConverter))] + public partial interface ICloudExadataInfrastructureUpdateTags + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..2524e34caa7f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.cs new file mode 100644 index 000000000000..7ae5d271b369 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class CloudExadataInfrastructureUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTagsInternal + { + + /// Creates an new instance. + public CloudExadataInfrastructureUpdateTags() + { + + } + } + /// Resource tags. + public partial interface ICloudExadataInfrastructureUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ICloudExadataInfrastructureUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.dictionary.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.dictionary.cs new file mode 100644 index 000000000000..722864e33cca --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public partial class CloudExadataInfrastructureUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.json.cs new file mode 100644 index 000000000000..ff05db2d8715 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudExadataInfrastructureUpdateTags.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class CloudExadataInfrastructureUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + /// + internal CloudExadataInfrastructureUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.PowerShell.cs new file mode 100644 index 000000000000..c2f0f5c5e31b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.PowerShell.cs @@ -0,0 +1,700 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// CloudVmCluster resource definition + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterTypeConverter))] + public partial class CloudVMCluster + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMCluster(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DiskRedundancy = (string) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DiskRedundancy, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanIPId = (System.Collections.Generic.List) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VipId = (System.Collections.Generic.List) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VipId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgCidr = (System.Collections.Generic.List) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbServer = (System.Collections.Generic.List) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbServer, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheObjective = (string) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheObjective, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheDbPlan = (System.Collections.Generic.List) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState = (string) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMCluster(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DiskRedundancy = (string) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DiskRedundancy, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanIPId = (System.Collections.Generic.List) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VipId = (System.Collections.Generic.List) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).VipId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgCidr = (System.Collections.Generic.List) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbServer = (System.Collections.Generic.List) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DbServer, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheObjective = (string) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheObjective, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheDbPlan = (System.Collections.Generic.List) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState = (string) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMCluster(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMCluster(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CloudVmCluster resource definition + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterTypeConverter))] + public partial interface ICloudVMCluster + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.TypeConverter.cs new file mode 100644 index 000000000000..582305d2943a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMCluster.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMCluster.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMCluster.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.cs new file mode 100644 index 000000000000..6292c6987be2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.cs @@ -0,0 +1,1248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudVmCluster resource definition + public partial class CloudVMCluster : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource(); + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string BackupSubnetCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).BackupSubnetCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).BackupSubnetCidr = value ?? null; } + + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CloudExadataInfrastructureId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).CloudExadataInfrastructureId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).CloudExadataInfrastructureId = value ?? null; } + + /// + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens + /// (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ClusterName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ClusterName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ClusterName = value ?? null; } + + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).CompartmentId; } + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComputeNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ComputeNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ComputeNode = value ?? null /* arrayOf */; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled = value ?? default(bool); } + + /// + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage + /// (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is + /// 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in + /// the Exadata documentation for details on the impact of the configuration settings on storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DataStoragePercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataStoragePercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataStoragePercentage = value ?? default(int); } + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataStorageSizeInTb = value ?? default(double); } + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DbNodeStorageSizeInGb = value ?? default(int); } + + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List DbServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DbServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DbServer = value ?? null /* arrayOf */; } + + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DiskRedundancy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DiskRedundancy; } + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DisplayName = value ?? null; } + + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Domain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Domain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Domain = value ?? null; } + + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string GiVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).GiVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).GiVersion = value ?? null; } + + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Hostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Hostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Hostname = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id; } + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List IormConfigCacheDbPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheDbPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheDbPlan = value ?? null /* arrayOf */; } + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleDetail = value ?? null; } + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleState = value ?? null; } + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string IormConfigCacheObjective { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheObjective; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheObjective = value ?? null; } + + /// + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on + /// local Exadata storage is not available in the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsLocalBackupEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IsLocalBackupEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IsLocalBackupEnabled = value ?? default(bool); } + + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsSparseDiskgroupEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IsSparseDiskgroupEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IsSparseDiskgroupEnabled = value ?? default(bool); } + + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LastUpdateHistoryEntryId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LastUpdateHistoryEntryId; } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LicenseModel = value ?? null; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LifecycleDetail; } + + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LifecycleState; } + + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public long? ListenerPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ListenerPort; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).MemorySizeInGb = value ?? default(int); } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).CompartmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).CompartmentId = value; } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.DataCollectionOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DataCollectionOption = value; } + + /// Internal Acessors for DiskRedundancy + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.DiskRedundancy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DiskRedundancy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).DiskRedundancy = value; } + + /// Internal Acessors for IormConfigCache + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.IormConfigCache { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCache; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).IormConfigCache = value; } + + /// Internal Acessors for LastUpdateHistoryEntryId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.LastUpdateHistoryEntryId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LastUpdateHistoryEntryId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LastUpdateHistoryEntryId = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for ListenerPort + long? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.ListenerPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ListenerPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ListenerPort = value; } + + /// Internal Acessors for NodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.NodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NodeCount = value; } + + /// Internal Acessors for NsgUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.NsgUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NsgUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NsgUrl = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ScanDnsName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.ScanDnsName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanDnsName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanDnsName = value; } + + /// Internal Acessors for ScanDnsRecordId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.ScanDnsRecordId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanDnsRecordId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanDnsRecordId = value; } + + /// Internal Acessors for ScanIPId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.ScanIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanIPId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanIPId = value; } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Shape = value; } + + /// Internal Acessors for SubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.SubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SubnetOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SubnetOcid = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for VipId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterInternal.VipId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).VipId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).VipId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Name; } + + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? NodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NodeCount; } + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List NsgCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NsgCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NsgCidr = value ?? null /* arrayOf */; } + + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string NsgUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).NsgUrl; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).OciUrl; } + + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Ocid; } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public float? OcpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).OcpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).OcpuCount = value ?? default(float); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterProperties()); set => this._property = value; } + + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScanDnsName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanDnsName; } + + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ScanDnsRecordId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanDnsRecordId; } + + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically + /// used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate + /// nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ScanIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanIPId; } + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? ScanListenerPortTcp { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcp; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcp = value ?? default(int); } + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? ScanListenerPortTcpSsl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcpSsl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcpSsl = value ?? default(int); } + + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).Shape; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? StorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).StorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).StorageSizeInGb = value ?? default(int); } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SubnetId = value ?? null; } + + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SubnetOcid; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } + + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SystemVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SystemVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).SystemVersion = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).TimeCreated; } + + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).TimeZone = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__trackedResource).Type; } + + /// + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains + /// one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is + /// reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List VipId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).VipId; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).VnetId = value ?? null; } + + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ZoneId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ZoneId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)Property).ZoneId = value ?? null; } + + /// Creates an new instance. + public CloudVMCluster() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// CloudVmCluster resource definition + public partial interface ICloudVMCluster : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Cloud Exadata Infrastructure ID", + SerializedName = @"cloudExadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string CloudExadataInfrastructureId { get; set; } + /// + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens + /// (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. ", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + string ClusterName { get; set; } + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cluster compartmentId", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage + /// (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is + /// 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in + /// the Exadata documentation for details on the impact of the configuration settings on storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. ", + SerializedName = @"dataStoragePercentage", + PossibleTypes = new [] { typeof(int) })] + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The list of DB servers.", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. ", + SerializedName = @"diskRedundancy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("High", "Normal")] + string DiskRedundancy { get; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The domain name for the cloud VM cluster.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; set; } + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The hostname for the cloud VM cluster.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig) })] + System.Collections.Generic.List IormConfigCacheDbPlan { get; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string IormConfigCacheLifecycleDetail { get; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("BootStrapping", "Enabled", "Disabled", "Updating", "Failed")] + string IormConfigCacheLifecycleState { get; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LowLatency", "HighThroughput", "Balanced", "Auto", "Basic")] + string IormConfigCacheObjective { get; } + /// + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on + /// local Exadata storage is not available in the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. ", + SerializedName = @"isLocalBackupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ", + SerializedName = @"isSparseDiskgroupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the last maintenance update history entry.", + SerializedName = @"lastUpdateHistoryEntryId", + PossibleTypes = new [] { typeof(string) })] + string LastUpdateHistoryEntryId { get; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudVmCluster lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; } + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The port number configured for the listener on the cloud VM cluster.", + SerializedName = @"listenerPort", + PossibleTypes = new [] { typeof(long) })] + long? ListenerPort { get; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of nodes in the cloud VM cluster. ", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int? NodeCount { get; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr) })] + System.Collections.Generic.List NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface.", + SerializedName = @"nsgUrl", + PossibleTypes = new [] { typeof(string) })] + string NsgUrl { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud VM Cluster ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudVmCluster provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. ", + SerializedName = @"scanDnsName", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsName { get; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster.", + SerializedName = @"scanDnsRecordId", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsRecordId { get; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically + /// used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate + /// nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"scanIpIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ScanIPId { get; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The model name of the Exadata hardware running the cloud VM cluster.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cluster subnet ocid", + SerializedName = @"subnetOcid", + PossibleTypes = new [] { typeof(string) })] + string SubnetOcid { get; } + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the cloud VM cluster was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains + /// one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is + /// reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"vipIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List VipId { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The OCID of the zone the cloud VM cluster is associated with.", + SerializedName = @"zoneId", + PossibleTypes = new [] { typeof(string) })] + string ZoneId { get; set; } + + } + /// CloudVmCluster resource definition + internal partial interface ICloudVMClusterInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + string CloudExadataInfrastructureId { get; set; } + /// + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens + /// (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// + string ClusterName { get; set; } + /// Cluster compartmentId + string CompartmentId { get; set; } + /// The list of compute servers to be added to the cloud VM cluster. + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int? CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage + /// (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is + /// 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in + /// the Exadata documentation for details on the impact of the configuration settings on storage. + /// + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + System.Collections.Generic.List DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("High", "Normal")] + string DiskRedundancy { get; set; } + /// Display Name + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + string Domain { get; set; } + /// Oracle Grid Infrastructure (GI) software version + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + string Hostname { get; set; } + /// iormConfigCache details for cloud VM cluster. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig IormConfigCache { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + System.Collections.Generic.List IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("BootStrapping", "Enabled", "Disabled", "Updating", "Failed")] + string IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LowLatency", "HighThroughput", "Balanced", "Auto", "Basic")] + string IormConfigCacheObjective { get; set; } + /// + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on + /// local Exadata storage is not available in the cloud VM cluster. + /// + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + string LastUpdateHistoryEntryId { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudVmCluster lifecycle state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; set; } + /// The port number configured for the listener on the cloud VM cluster. + long? ListenerPort { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + int? NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + System.Collections.Generic.List NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + string NsgUrl { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Cloud VM Cluster ocid + string Ocid { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties Property { get; set; } + /// CloudVmCluster provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsName { get; set; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsRecordId { get; set; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically + /// used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate + /// nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + System.Collections.Generic.List ScanIPId { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + string Shape { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// Cluster subnet ocid + string SubnetOcid { get; set; } + /// Operating system version of the image. + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + string TimeZone { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains + /// one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is + /// reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + System.Collections.Generic.List VipId { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + string ZoneId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.json.cs new file mode 100644 index 000000000000..f5ca9f7f14c7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMCluster.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudVmCluster resource definition + public partial class CloudVMCluster + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMCluster(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudVMCluster(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.PowerShell.cs new file mode 100644 index 000000000000..f751058e1ea3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a CloudVmCluster list operation. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterListResultTypeConverter))] + public partial class CloudVMClusterListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a CloudVmCluster list operation. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterListResultTypeConverter))] + public partial interface ICloudVMClusterListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.TypeConverter.cs new file mode 100644 index 000000000000..17d63c4f017f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.cs new file mode 100644 index 000000000000..6d9ca871233c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a CloudVmCluster list operation. + public partial class CloudVMClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The CloudVmCluster items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public CloudVMClusterListResult() + { + + } + } + /// The response of a CloudVmCluster list operation. + public partial interface ICloudVMClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The CloudVmCluster items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The CloudVmCluster items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a CloudVmCluster list operation. + internal partial interface ICloudVMClusterListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The CloudVmCluster items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.json.cs new file mode 100644 index 000000000000..62d7c4fa5600 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a CloudVmCluster list operation. + public partial class CloudVMClusterListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudVMClusterListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.PowerShell.cs new file mode 100644 index 000000000000..91de019e0f73 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.PowerShell.cs @@ -0,0 +1,596 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// CloudVmCluster resource model + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterPropertiesTypeConverter))] + public partial class CloudVMClusterProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DiskRedundancy = (string) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DiskRedundancy, global::System.Convert.ToString); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanIPId = (System.Collections.Generic.List) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VipId = (System.Collections.Generic.List) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VipId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgCidr = (System.Collections.Generic.List) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbServer = (System.Collections.Generic.List) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbServer, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective = (string) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan = (System.Collections.Generic.List) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState = (string) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DiskRedundancy = (string) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DiskRedundancy, global::System.Convert.ToString); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanIPId = (System.Collections.Generic.List) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VipId = (System.Collections.Generic.List) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VipId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgCidr = (System.Collections.Generic.List) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbServer = (System.Collections.Generic.List) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DbServer, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective = (string) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan = (System.Collections.Generic.List) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState = (string) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CloudVmCluster resource model + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterPropertiesTypeConverter))] + public partial interface ICloudVMClusterProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.TypeConverter.cs new file mode 100644 index 000000000000..abbce5dedc2d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.cs new file mode 100644 index 000000000000..f1d6f3176ca4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.cs @@ -0,0 +1,1302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudVmCluster resource model + public partial class CloudVMClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal + { + + /// Backing field for property. + private string _backupSubnetCidr; + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string BackupSubnetCidr { get => this._backupSubnetCidr; set => this._backupSubnetCidr = value; } + + /// Backing field for property. + private string _cloudExadataInfrastructureId; + + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CloudExadataInfrastructureId { get => this._cloudExadataInfrastructureId; set => this._cloudExadataInfrastructureId = value; } + + /// Backing field for property. + private string _clusterName; + + /// + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens + /// (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _compartmentId; + + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CompartmentId { get => this._compartmentId; } + + /// Backing field for property. + private System.Collections.Generic.List _computeNode; + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List ComputeNode { get => this._computeNode; set => this._computeNode = value; } + + /// Backing field for property. + private int _cpuCoreCount; + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions _dataCollectionOption; + + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions()); set => this._dataCollectionOption = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled = value ?? default(bool); } + + /// Backing field for property. + private int? _dataStoragePercentage; + + /// + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage + /// (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is + /// 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in + /// the Exadata documentation for details on the impact of the configuration settings on storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DataStoragePercentage { get => this._dataStoragePercentage; set => this._dataStoragePercentage = value; } + + /// Backing field for property. + private double? _dataStorageSizeInTb; + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set => this._dbNodeStorageSizeInGb = value; } + + /// Backing field for property. + private System.Collections.Generic.List _dbServer; + + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List DbServer { get => this._dbServer; set => this._dbServer = value; } + + /// Backing field for property. + private string _diskRedundancy; + + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DiskRedundancy { get => this._diskRedundancy; } + + /// Backing field for property. + private string _displayName; + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _domain; + + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Domain { get => this._domain; set => this._domain = value; } + + /// Backing field for property. + private string _giVersion; + + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string GiVersion { get => this._giVersion; set => this._giVersion = value; } + + /// Backing field for property. + private string _hostname; + + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Hostname { get => this._hostname; set => this._hostname = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig _iormConfigCache; + + /// iormConfigCache details for cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig IormConfigCache { get => (this._iormConfigCache = this._iormConfigCache ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfig()); } + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List IormConfigCacheDbPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).DbPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).DbPlan = value ?? null /* arrayOf */; } + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).LifecycleDetail = value ?? null; } + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).LifecycleState = value ?? null; } + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string IormConfigCacheObjective { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).Objective; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)IormConfigCache).Objective = value ?? null; } + + /// Backing field for property. + private bool? _isLocalBackupEnabled; + + /// + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on + /// local Exadata storage is not available in the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsLocalBackupEnabled { get => this._isLocalBackupEnabled; set => this._isLocalBackupEnabled = value; } + + /// Backing field for property. + private bool? _isSparseDiskgroupEnabled; + + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsSparseDiskgroupEnabled { get => this._isSparseDiskgroupEnabled; set => this._isSparseDiskgroupEnabled = value; } + + /// Backing field for property. + private string _lastUpdateHistoryEntryId; + + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LastUpdateHistoryEntryId { get => this._lastUpdateHistoryEntryId; } + + /// Backing field for property. + private string _licenseModel; + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private string _lifecycleState; + + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private long? _listenerPort; + + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public long? ListenerPort { get => this._listenerPort; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; set => this._memorySizeInGb = value; } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.CompartmentId { get => this._compartmentId; set { {_compartmentId = value;} } } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions()); set { {_dataCollectionOption = value;} } } + + /// Internal Acessors for DiskRedundancy + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.DiskRedundancy { get => this._diskRedundancy; set { {_diskRedundancy = value;} } } + + /// Internal Acessors for IormConfigCache + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.IormConfigCache { get => (this._iormConfigCache = this._iormConfigCache ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfig()); set { {_iormConfigCache = value;} } } + + /// Internal Acessors for LastUpdateHistoryEntryId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.LastUpdateHistoryEntryId { get => this._lastUpdateHistoryEntryId; set { {_lastUpdateHistoryEntryId = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for ListenerPort + long? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.ListenerPort { get => this._listenerPort; set { {_listenerPort = value;} } } + + /// Internal Acessors for NodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.NodeCount { get => this._nodeCount; set { {_nodeCount = value;} } } + + /// Internal Acessors for NsgUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.NsgUrl { get => this._nsgUrl; set { {_nsgUrl = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ScanDnsName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.ScanDnsName { get => this._scanDnsName; set { {_scanDnsName = value;} } } + + /// Internal Acessors for ScanDnsRecordId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.ScanDnsRecordId { get => this._scanDnsRecordId; set { {_scanDnsRecordId = value;} } } + + /// Internal Acessors for ScanIPId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.ScanIPId { get => this._scanIPId; set { {_scanIPId = value;} } } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.Shape { get => this._shape; set { {_shape = value;} } } + + /// Internal Acessors for SubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.SubnetOcid { get => this._subnetOcid; set { {_subnetOcid = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for VipId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterPropertiesInternal.VipId { get => this._vipId; set { {_vipId = value;} } } + + /// Backing field for property. + private int? _nodeCount; + + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? NodeCount { get => this._nodeCount; } + + /// Backing field for property. + private System.Collections.Generic.List _nsgCidr; + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List NsgCidr { get => this._nsgCidr; set => this._nsgCidr = value; } + + /// Backing field for property. + private string _nsgUrl; + + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NsgUrl { get => this._nsgUrl; } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private float? _ocpuCount; + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public float? OcpuCount { get => this._ocpuCount; set => this._ocpuCount = value; } + + /// Backing field for property. + private string _provisioningState; + + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _scanDnsName; + + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ScanDnsName { get => this._scanDnsName; } + + /// Backing field for property. + private string _scanDnsRecordId; + + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ScanDnsRecordId { get => this._scanDnsRecordId; } + + /// Backing field for property. + private System.Collections.Generic.List _scanIPId; + + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically + /// used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate + /// nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List ScanIPId { get => this._scanIPId; } + + /// Backing field for property. + private int? _scanListenerPortTcp; + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? ScanListenerPortTcp { get => this._scanListenerPortTcp; set => this._scanListenerPortTcp = value; } + + /// Backing field for property. + private int? _scanListenerPortTcpSsl; + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? ScanListenerPortTcpSsl { get => this._scanListenerPortTcpSsl; set => this._scanListenerPortTcpSsl = value; } + + /// Backing field for property. + private string _shape; + + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Shape { get => this._shape; } + + /// Backing field for property. + private System.Collections.Generic.List _sshPublicKey; + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List SshPublicKey { get => this._sshPublicKey; set => this._sshPublicKey = value; } + + /// Backing field for property. + private int? _storageSizeInGb; + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? StorageSizeInGb { get => this._storageSizeInGb; set => this._storageSizeInGb = value; } + + /// Backing field for property. + private string _subnetId; + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private string _subnetOcid; + + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SubnetOcid { get => this._subnetOcid; } + + /// Backing field for property. + private string _systemVersion; + + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SystemVersion { get => this._systemVersion; set => this._systemVersion = value; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private string _timeZone; + + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Backing field for property. + private System.Collections.Generic.List _vipId; + + /// + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains + /// one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is + /// reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List VipId { get => this._vipId; } + + /// Backing field for property. + private string _vnetId; + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string VnetId { get => this._vnetId; set => this._vnetId = value; } + + /// Backing field for property. + private string _zoneId; + + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ZoneId { get => this._zoneId; set => this._zoneId = value; } + + /// Creates an new instance. + public CloudVMClusterProperties() + { + + } + } + /// CloudVmCluster resource model + public partial interface ICloudVMClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Cloud Exadata Infrastructure ID", + SerializedName = @"cloudExadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string CloudExadataInfrastructureId { get; set; } + /// + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens + /// (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. ", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + string ClusterName { get; set; } + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cluster compartmentId", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage + /// (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is + /// 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in + /// the Exadata documentation for details on the impact of the configuration settings on storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. ", + SerializedName = @"dataStoragePercentage", + PossibleTypes = new [] { typeof(int) })] + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The list of DB servers.", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. ", + SerializedName = @"diskRedundancy", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("High", "Normal")] + string DiskRedundancy { get; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The domain name for the cloud VM cluster.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; set; } + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The hostname for the cloud VM cluster.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig) })] + System.Collections.Generic.List IormConfigCacheDbPlan { get; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string IormConfigCacheLifecycleDetail { get; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("BootStrapping", "Enabled", "Disabled", "Updating", "Failed")] + string IormConfigCacheLifecycleState { get; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LowLatency", "HighThroughput", "Balanced", "Auto", "Basic")] + string IormConfigCacheObjective { get; } + /// + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on + /// local Exadata storage is not available in the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. ", + SerializedName = @"isLocalBackupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ", + SerializedName = @"isSparseDiskgroupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the last maintenance update history entry.", + SerializedName = @"lastUpdateHistoryEntryId", + PossibleTypes = new [] { typeof(string) })] + string LastUpdateHistoryEntryId { get; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudVmCluster lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; } + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The port number configured for the listener on the cloud VM cluster.", + SerializedName = @"listenerPort", + PossibleTypes = new [] { typeof(long) })] + long? ListenerPort { get; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of nodes in the cloud VM cluster. ", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int? NodeCount { get; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr) })] + System.Collections.Generic.List NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface.", + SerializedName = @"nsgUrl", + PossibleTypes = new [] { typeof(string) })] + string NsgUrl { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud VM Cluster ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"CloudVmCluster provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. ", + SerializedName = @"scanDnsName", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsName { get; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster.", + SerializedName = @"scanDnsRecordId", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsRecordId { get; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically + /// used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate + /// nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"scanIpIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ScanIPId { get; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The model name of the Exadata hardware running the cloud VM cluster.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cluster subnet ocid", + SerializedName = @"subnetOcid", + PossibleTypes = new [] { typeof(string) })] + string SubnetOcid { get; } + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the cloud VM cluster was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains + /// one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is + /// reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"vipIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List VipId { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The OCID of the zone the cloud VM cluster is associated with.", + SerializedName = @"zoneId", + PossibleTypes = new [] { typeof(string) })] + string ZoneId { get; set; } + + } + /// CloudVmCluster resource model + internal partial interface ICloudVMClusterPropertiesInternal + + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + string CloudExadataInfrastructureId { get; set; } + /// + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens + /// (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// + string ClusterName { get; set; } + /// Cluster compartmentId + string CompartmentId { get; set; } + /// The list of compute servers to be added to the cloud VM cluster. + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage + /// (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is + /// 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in + /// the Exadata documentation for details on the impact of the configuration settings on storage. + /// + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + System.Collections.Generic.List DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("High", "Normal")] + string DiskRedundancy { get; set; } + /// Display Name + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + string Domain { get; set; } + /// Oracle Grid Infrastructure (GI) software version + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + string Hostname { get; set; } + /// iormConfigCache details for cloud VM cluster. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig IormConfigCache { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + System.Collections.Generic.List IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("BootStrapping", "Enabled", "Disabled", "Updating", "Failed")] + string IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LowLatency", "HighThroughput", "Balanced", "Auto", "Basic")] + string IormConfigCacheObjective { get; set; } + /// + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on + /// local Exadata storage is not available in the cloud VM cluster. + /// + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + string LastUpdateHistoryEntryId { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudVmCluster lifecycle state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Terminating", "Terminated", "MaintenanceInProgress", "Failed")] + string LifecycleState { get; set; } + /// The port number configured for the listener on the cloud VM cluster. + long? ListenerPort { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + int? NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + System.Collections.Generic.List NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + string NsgUrl { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Cloud VM Cluster ocid + string Ocid { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// CloudVmCluster provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsName { get; set; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsRecordId { get; set; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically + /// used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate + /// nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + System.Collections.Generic.List ScanIPId { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + string Shape { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// Cluster subnet ocid + string SubnetOcid { get; set; } + /// Operating system version of the image. + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + string TimeZone { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains + /// one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is + /// reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + System.Collections.Generic.List VipId { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + string ZoneId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.json.cs new file mode 100644 index 000000000000..651dfee73dff --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterProperties.json.cs @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CloudVmCluster resource model + public partial class CloudVMClusterProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dataCollectionOption = If( json?.PropertyT("dataCollectionOptions"), out var __jsonDataCollectionOptions) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions.FromJson(__jsonDataCollectionOptions) : _dataCollectionOption;} + {_iormConfigCache = If( json?.PropertyT("iormConfigCache"), out var __jsonIormConfigCache) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ExadataIormConfig.FromJson(__jsonIormConfigCache) : _iormConfigCache;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_listenerPort = If( json?.PropertyT("listenerPort"), out var __jsonListenerPort) ? (long?)__jsonListenerPort : _listenerPort;} + {_nodeCount = If( json?.PropertyT("nodeCount"), out var __jsonNodeCount) ? (int?)__jsonNodeCount : _nodeCount;} + {_storageSizeInGb = If( json?.PropertyT("storageSizeInGbs"), out var __jsonStorageSizeInGbs) ? (int?)__jsonStorageSizeInGbs : _storageSizeInGb;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (double?)__jsonDataStorageSizeInTbs : _dataStorageSizeInTb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : _dbNodeStorageSizeInGb;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : _memorySizeInGb;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : _timeCreated : _timeCreated;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)_timeZone;} + {_zoneId = If( json?.PropertyT("zoneId"), out var __jsonZoneId) ? (string)__jsonZoneId : (string)_zoneId;} + {_hostname = If( json?.PropertyT("hostname"), out var __jsonHostname) ? (string)__jsonHostname : (string)_hostname;} + {_domain = If( json?.PropertyT("domain"), out var __jsonDomain) ? (string)__jsonDomain : (string)_domain;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int)__jsonCpuCoreCount : _cpuCoreCount;} + {_ocpuCount = If( json?.PropertyT("ocpuCount"), out var __jsonOcpuCount) ? (float?)__jsonOcpuCount : _ocpuCount;} + {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)_clusterName;} + {_dataStoragePercentage = If( json?.PropertyT("dataStoragePercentage"), out var __jsonDataStoragePercentage) ? (int?)__jsonDataStoragePercentage : _dataStoragePercentage;} + {_isLocalBackupEnabled = If( json?.PropertyT("isLocalBackupEnabled"), out var __jsonIsLocalBackupEnabled) ? (bool?)__jsonIsLocalBackupEnabled : _isLocalBackupEnabled;} + {_cloudExadataInfrastructureId = If( json?.PropertyT("cloudExadataInfrastructureId"), out var __jsonCloudExadataInfrastructureId) ? (string)__jsonCloudExadataInfrastructureId : (string)_cloudExadataInfrastructureId;} + {_isSparseDiskgroupEnabled = If( json?.PropertyT("isSparseDiskgroupEnabled"), out var __jsonIsSparseDiskgroupEnabled) ? (bool?)__jsonIsSparseDiskgroupEnabled : _isSparseDiskgroupEnabled;} + {_systemVersion = If( json?.PropertyT("systemVersion"), out var __jsonSystemVersion) ? (string)__jsonSystemVersion : (string)_systemVersion;} + {_sshPublicKey = If( json?.PropertyT("sshPublicKeys"), out var __jsonSshPublicKeys) ? If( __jsonSshPublicKeys as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _sshPublicKey;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)_licenseModel;} + {_diskRedundancy = If( json?.PropertyT("diskRedundancy"), out var __jsonDiskRedundancy) ? (string)__jsonDiskRedundancy : (string)_diskRedundancy;} + {_scanIPId = If( json?.PropertyT("scanIpIds"), out var __jsonScanIPIds) ? If( __jsonScanIPIds as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _scanIPId;} + {_vipId = If( json?.PropertyT("vipIds"), out var __jsonVipIds) ? If( __jsonVipIds as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _vipId;} + {_scanDnsName = If( json?.PropertyT("scanDnsName"), out var __jsonScanDnsName) ? (string)__jsonScanDnsName : (string)_scanDnsName;} + {_scanListenerPortTcp = If( json?.PropertyT("scanListenerPortTcp"), out var __jsonScanListenerPortTcp) ? (int?)__jsonScanListenerPortTcp : _scanListenerPortTcp;} + {_scanListenerPortTcpSsl = If( json?.PropertyT("scanListenerPortTcpSsl"), out var __jsonScanListenerPortTcpSsl) ? (int?)__jsonScanListenerPortTcpSsl : _scanListenerPortTcpSsl;} + {_scanDnsRecordId = If( json?.PropertyT("scanDnsRecordId"), out var __jsonScanDnsRecordId) ? (string)__jsonScanDnsRecordId : (string)_scanDnsRecordId;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)_shape;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_vnetId = If( json?.PropertyT("vnetId"), out var __jsonVnetId) ? (string)__jsonVnetId : (string)_vnetId;} + {_giVersion = If( json?.PropertyT("giVersion"), out var __jsonGiVersion) ? (string)__jsonGiVersion : (string)_giVersion;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)_ociUrl;} + {_nsgUrl = If( json?.PropertyT("nsgUrl"), out var __jsonNsgUrl) ? (string)__jsonNsgUrl : (string)_nsgUrl;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)_subnetId;} + {_backupSubnetCidr = If( json?.PropertyT("backupSubnetCidr"), out var __jsonBackupSubnetCidr) ? (string)__jsonBackupSubnetCidr : (string)_backupSubnetCidr;} + {_nsgCidr = If( json?.PropertyT("nsgCidrs"), out var __jsonNsgCidrs) ? If( __jsonNsgCidrs as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr.FromJson(__f) )) ))() : null : _nsgCidr;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_lastUpdateHistoryEntryId = If( json?.PropertyT("lastUpdateHistoryEntryId"), out var __jsonLastUpdateHistoryEntryId) ? (string)__jsonLastUpdateHistoryEntryId : (string)_lastUpdateHistoryEntryId;} + {_dbServer = If( json?.PropertyT("dbServers"), out var __jsonDbServers) ? If( __jsonDbServers as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var ___z) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___z, (___y)=>(string) (___y is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString ___x ? (string)(___x.ToString()) : null)) ))() : null : _dbServer;} + {_compartmentId = If( json?.PropertyT("compartmentId"), out var __jsonCompartmentId) ? (string)__jsonCompartmentId : (string)_compartmentId;} + {_subnetOcid = If( json?.PropertyT("subnetOcid"), out var __jsonSubnetOcid) ? (string)__jsonSubnetOcid : (string)_subnetOcid;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudVMClusterProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dataCollectionOption ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._dataCollectionOption.ToJson(null,serializationMode) : null, "dataCollectionOptions" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._iormConfigCache ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._iormConfigCache.ToJson(null,serializationMode) : null, "iormConfigCache" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._listenerPort ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((long)this._listenerPort) : null, "listenerPort" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._nodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._nodeCount) : null, "nodeCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != this._storageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._storageSizeInGb) : null, "storageSizeInGbs" ,container.Add ); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._zoneId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._zoneId.ToString()) : null, "zoneId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._hostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._hostname.ToString()) : null, "hostname" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain" ,container.Add ); + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber(this._cpuCoreCount), "cpuCoreCount" ,container.Add ); + AddIf( null != this._ocpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((float)this._ocpuCount) : null, "ocpuCount" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._clusterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._clusterName.ToString()) : null, "clusterName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._dataStoragePercentage ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dataStoragePercentage) : null, "dataStoragePercentage" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._isLocalBackupEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isLocalBackupEnabled) : null, "isLocalBackupEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._cloudExadataInfrastructureId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloudExadataInfrastructureId.ToString()) : null, "cloudExadataInfrastructureId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._isSparseDiskgroupEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isSparseDiskgroupEnabled) : null, "isSparseDiskgroupEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._systemVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._systemVersion.ToString()) : null, "systemVersion" ,container.Add ); + } + if (null != this._sshPublicKey) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._sshPublicKey ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("sshPublicKeys",__w); + } + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._diskRedundancy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._diskRedundancy.ToString()) : null, "diskRedundancy" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._scanIPId) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __s in this._scanIPId ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("scanIpIds",__r); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._vipId) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __n in this._vipId ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("vipIds",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._scanDnsName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._scanDnsName.ToString()) : null, "scanDnsName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._scanListenerPortTcp ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._scanListenerPortTcp) : null, "scanListenerPortTcp" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != this._scanListenerPortTcpSsl ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._scanListenerPortTcpSsl) : null, "scanListenerPortTcpSsl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._scanDnsRecordId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._scanDnsRecordId.ToString()) : null, "scanDnsRecordId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._vnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._vnetId.ToString()) : null, "vnetId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._giVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._giVersion.ToString()) : null, "giVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nsgUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nsgUrl.ToString()) : null, "nsgUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._backupSubnetCidr)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._backupSubnetCidr.ToString()) : null, "backupSubnetCidr" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + if (null != this._nsgCidr) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __i in this._nsgCidr ) + { + AddIf(__i?.ToJson(null, serializationMode) ,__h.Add); + } + container.Add("nsgCidrs",__h); + } + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + if (null != this._computeNode) + { + var __c = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __d in this._computeNode ) + { + AddIf(null != (((object)__d)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__d.ToString()) : null ,__c.Add); + } + container.Add("computeNodes",__c); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lastUpdateHistoryEntryId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lastUpdateHistoryEntryId.ToString()) : null, "lastUpdateHistoryEntryId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + if (null != this._dbServer) + { + var __a = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __b in this._dbServer ) + { + AddIf(null != (((object)__b)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__b.ToString()) : null ,__a.Add); + } + container.Add("dbServers",__a); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._compartmentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._compartmentId.ToString()) : null, "compartmentId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._subnetOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._subnetOcid.ToString()) : null, "subnetOcid" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.PowerShell.cs new file mode 100644 index 000000000000..2b00c02a759b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.PowerShell.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The type used for update operations of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTypeConverter))] + public partial class CloudVMClusterUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTypeConverter))] + public partial interface ICloudVMClusterUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.TypeConverter.cs new file mode 100644 index 000000000000..c887885fd045 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.cs new file mode 100644 index 000000000000..d9ccd4348d8b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.cs @@ -0,0 +1,332 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the CloudVmCluster. + public partial class CloudVMClusterUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal + { + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ComputeNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).ComputeNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).ComputeNode = value ?? null /* arrayOf */; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled = value ?? default(bool); } + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataStorageSizeInTb = value ?? default(double); } + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DbNodeStorageSizeInGb = value ?? default(int); } + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).LicenseModel = value ?? null; } + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).MemorySizeInGb = value ?? default(int); } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal.DataCollectionOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOption = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateProperties()); set { {_property = value;} } } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public float? OcpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).OcpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).OcpuCount = value ?? default(float); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties _property; + + /// The updatable properties of the CloudVmCluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateProperties()); set => this._property = value; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? StorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).StorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)Property).StorageSizeInGb = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateTags()); set => this._tag = value; } + + /// Creates an new instance. + public CloudVMClusterUpdate() + { + + } + } + /// The type used for update operations of the CloudVmCluster. + public partial interface ICloudVMClusterUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags Tag { get; set; } + + } + /// The type used for update operations of the CloudVmCluster. + internal partial interface ICloudVMClusterUpdateInternal + + { + /// The list of compute servers to be added to the cloud VM cluster. + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int? CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + string DisplayName { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// The updatable properties of the CloudVmCluster. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties Property { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.json.cs new file mode 100644 index 000000000000..5f2ad142a143 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the CloudVmCluster. + public partial class CloudVMClusterUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateProperties.FromJson(__jsonProperties) : _property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateTags.FromJson(__jsonTags) : _tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudVMClusterUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..587df9ca3c25 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.PowerShell.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The updatable properties of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdatePropertiesTypeConverter))] + public partial class CloudVMClusterUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey = (System.Collections.Generic.List) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel = (string) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode = (System.Collections.Generic.List) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdatePropertiesTypeConverter))] + public partial interface ICloudVMClusterUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..620754bc77c6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.cs new file mode 100644 index 000000000000..a2da69b0bf39 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.cs @@ -0,0 +1,339 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the CloudVmCluster. + public partial class CloudVMClusterUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _computeNode; + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List ComputeNode { get => this._computeNode; set => this._computeNode = value; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions _dataCollectionOption; + + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions()); set => this._dataCollectionOption = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled = value ?? default(bool); } + + /// Backing field for property. + private double? _dataStorageSizeInTb; + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set => this._dbNodeStorageSizeInGb = value; } + + /// Backing field for property. + private string _displayName; + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _licenseModel; + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; set => this._memorySizeInGb = value; } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdatePropertiesInternal.DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions()); set { {_dataCollectionOption = value;} } } + + /// Backing field for property. + private float? _ocpuCount; + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public float? OcpuCount { get => this._ocpuCount; set => this._ocpuCount = value; } + + /// Backing field for property. + private System.Collections.Generic.List _sshPublicKey; + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List SshPublicKey { get => this._sshPublicKey; set => this._sshPublicKey = value; } + + /// Backing field for property. + private int? _storageSizeInGb; + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? StorageSizeInGb { get => this._storageSizeInGb; set => this._storageSizeInGb = value; } + + /// Creates an new instance. + public CloudVMClusterUpdateProperties() + { + + } + } + /// The updatable properties of the CloudVmCluster. + public partial interface ICloudVMClusterUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = false, + Update = true, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + + } + /// The updatable properties of the CloudVmCluster. + internal partial interface ICloudVMClusterUpdatePropertiesInternal + + { + /// The list of compute servers to be added to the cloud VM cluster. + System.Collections.Generic.List ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int? CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + string DisplayName { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + string LicenseModel { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + System.Collections.Generic.List SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.json.cs new file mode 100644 index 000000000000..e9c719019144 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateProperties.json.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the CloudVmCluster. + public partial class CloudVMClusterUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dataCollectionOption = If( json?.PropertyT("dataCollectionOptions"), out var __jsonDataCollectionOptions) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DataCollectionOptions.FromJson(__jsonDataCollectionOptions) : _dataCollectionOption;} + {_storageSizeInGb = If( json?.PropertyT("storageSizeInGbs"), out var __jsonStorageSizeInGbs) ? (int?)__jsonStorageSizeInGbs : _storageSizeInGb;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (double?)__jsonDataStorageSizeInTbs : _dataStorageSizeInTb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : _dbNodeStorageSizeInGb;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : _memorySizeInGb;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : _cpuCoreCount;} + {_ocpuCount = If( json?.PropertyT("ocpuCount"), out var __jsonOcpuCount) ? (float?)__jsonOcpuCount : _ocpuCount;} + {_sshPublicKey = If( json?.PropertyT("sshPublicKeys"), out var __jsonSshPublicKeys) ? If( __jsonSshPublicKeys as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _sshPublicKey;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)_licenseModel;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudVMClusterUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dataCollectionOption ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._dataCollectionOption.ToJson(null,serializationMode) : null, "dataCollectionOptions" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != this._storageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._storageSizeInGb) : null, "storageSizeInGbs" ,container.Add ); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + AddIf( null != this._ocpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((float)this._ocpuCount) : null, "ocpuCount" ,container.Add ); + if (null != this._sshPublicKey) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._sshPublicKey ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("sshPublicKeys",__w); + } + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + if (null != this._computeNode) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __s in this._computeNode ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("computeNodes",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..ce5417ff75c3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTagsTypeConverter))] + public partial class CloudVMClusterUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterUpdateTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTagsTypeConverter))] + public partial interface ICloudVMClusterUpdateTags + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..c85783d37fe4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.cs new file mode 100644 index 000000000000..06579b7857cd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class CloudVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTagsInternal + { + + /// Creates an new instance. + public CloudVMClusterUpdateTags() + { + + } + } + /// Resource tags. + public partial interface ICloudVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ICloudVMClusterUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.dictionary.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.dictionary.cs new file mode 100644 index 000000000000..890b79d17f39 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public partial class CloudVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.json.cs new file mode 100644 index 000000000000..b3c18b991a58 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CloudVMClusterUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class CloudVMClusterUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + /// + internal CloudVMClusterUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CloudVMClusterUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.PowerShell.cs new file mode 100644 index 000000000000..ce7904b92708 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Connection strings to connect to an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(ConnectionStringTypeTypeConverter))] + public partial class ConnectionStringType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ConnectionStringType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("AllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("Dedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Dedicated = (string) content.GetValueForProperty("Dedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Dedicated, global::System.Convert.ToString); + } + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Profile = (System.Collections.Generic.List) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Profile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ConnectionStringType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType) content.GetValueForProperty("AllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("Dedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Dedicated = (string) content.GetValueForProperty("Dedicated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Dedicated, global::System.Convert.ToString); + } + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Profile = (System.Collections.Generic.List) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).Profile, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ConnectionStringType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ConnectionStringType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Connection strings to connect to an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(ConnectionStringTypeTypeConverter))] + public partial interface IConnectionStringType + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.TypeConverter.cs new file mode 100644 index 000000000000..5fd7ffee8b3f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ConnectionStringTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ConnectionStringType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ConnectionStringType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ConnectionStringType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.cs new file mode 100644 index 000000000000..28da70673313 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.cs @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Connection strings to connect to an Oracle Autonomous Database. + public partial class ConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType _allConnectionString; + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType AllConnectionString { get => (this._allConnectionString = this._allConnectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringType()); set => this._allConnectionString = value; } + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)AllConnectionString).High; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)AllConnectionString).High = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)AllConnectionString).Low; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)AllConnectionString).Low = value ?? null; } + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)AllConnectionString).Medium; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringTypeInternal)AllConnectionString).Medium = value ?? null; } + + /// Backing field for property. + private string _dedicated; + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Dedicated { get => this._dedicated; set => this._dedicated = value; } + + /// Backing field for property. + private string _high; + + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string High { get => this._high; set => this._high = value; } + + /// Backing field for property. + private string _low; + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Low { get => this._low; set => this._low = value; } + + /// Backing field for property. + private string _medium; + + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Medium { get => this._medium; set => this._medium = value; } + + /// Internal Acessors for AllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringTypeInternal.AllConnectionString { get => (this._allConnectionString = this._allConnectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringType()); set { {_allConnectionString = value;} } } + + /// Backing field for property. + private System.Collections.Generic.List _profile; + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Profile { get => this._profile; set => this._profile = value; } + + /// Creates an new instance. + public ConnectionStringType() + { + + } + } + /// Connection strings to connect to an Oracle Autonomous Database. + public partial interface IConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringLow { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringMedium { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"dedicated", + PossibleTypes = new [] { typeof(string) })] + string Dedicated { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string Low { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string Medium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata.", + SerializedName = @"profiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType) })] + System.Collections.Generic.List Profile { get; set; } + + } + /// Connection strings to connect to an Oracle Autonomous Database. + internal partial interface IConnectionStringTypeInternal + + { + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAllConnectionStringType AllConnectionString { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string AllConnectionStringLow { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + string AllConnectionStringMedium { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + string Dedicated { get; set; } + /// + /// The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, + /// but supports the fewest number of concurrent SQL statements. + /// + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string Low { get; set; } + /// + /// The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level + /// of performance, but supports more concurrent SQL statements. + /// + string Medium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + System.Collections.Generic.List Profile { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.json.cs new file mode 100644 index 000000000000..a992066806d7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionStringType.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Connection strings to connect to an Oracle Autonomous Database. + public partial class ConnectionStringType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ConnectionStringType(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_allConnectionString = If( json?.PropertyT("allConnectionStrings"), out var __jsonAllConnectionStrings) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AllConnectionStringType.FromJson(__jsonAllConnectionStrings) : _allConnectionString;} + {_dedicated = If( json?.PropertyT("dedicated"), out var __jsonDedicated) ? (string)__jsonDedicated : (string)_dedicated;} + {_high = If( json?.PropertyT("high"), out var __jsonHigh) ? (string)__jsonHigh : (string)_high;} + {_low = If( json?.PropertyT("low"), out var __jsonLow) ? (string)__jsonLow : (string)_low;} + {_medium = If( json?.PropertyT("medium"), out var __jsonMedium) ? (string)__jsonMedium : (string)_medium;} + {_profile = If( json?.PropertyT("profiles"), out var __jsonProfiles) ? If( __jsonProfiles as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProfileType.FromJson(__u) )) ))() : null : _profile;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionStringType FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ConnectionStringType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._allConnectionString ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._allConnectionString.ToJson(null,serializationMode) : null, "allConnectionStrings" ,container.Add ); + AddIf( null != (((object)this._dedicated)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dedicated.ToString()) : null, "dedicated" ,container.Add ); + AddIf( null != (((object)this._high)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._high.ToString()) : null, "high" ,container.Add ); + AddIf( null != (((object)this._low)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._low.ToString()) : null, "low" ,container.Add ); + AddIf( null != (((object)this._medium)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._medium.ToString()) : null, "medium" ,container.Add ); + if (null != this._profile) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._profile ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("profiles",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.PowerShell.cs new file mode 100644 index 000000000000..75cd5619d88e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.PowerShell.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + [System.ComponentModel.TypeConverter(typeof(ConnectionUrlTypeTypeConverter))] + public partial class ConnectionUrlType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ConnectionUrlType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).ApexUrl = (string) content.GetValueForProperty("ApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).ApexUrl, global::System.Convert.ToString); + } + if (content.Contains("DatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl = (string) content.GetValueForProperty("DatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("GraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).GraphStudioUrl = (string) content.GetValueForProperty("GraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).GraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("MachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl = (string) content.GetValueForProperty("MachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("MongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MongoDbUrl = (string) content.GetValueForProperty("MongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("OrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).OrdsUrl = (string) content.GetValueForProperty("OrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).OrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).SqlDevWebUrl = (string) content.GetValueForProperty("SqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).SqlDevWebUrl, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ConnectionUrlType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).ApexUrl = (string) content.GetValueForProperty("ApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).ApexUrl, global::System.Convert.ToString); + } + if (content.Contains("DatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl = (string) content.GetValueForProperty("DatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("GraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).GraphStudioUrl = (string) content.GetValueForProperty("GraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).GraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("MachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl = (string) content.GetValueForProperty("MachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("MongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MongoDbUrl = (string) content.GetValueForProperty("MongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).MongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("OrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).OrdsUrl = (string) content.GetValueForProperty("OrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).OrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).SqlDevWebUrl = (string) content.GetValueForProperty("SqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal)this).SqlDevWebUrl, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ConnectionUrlType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ConnectionUrlType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + [System.ComponentModel.TypeConverter(typeof(ConnectionUrlTypeTypeConverter))] + public partial interface IConnectionUrlType + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.TypeConverter.cs new file mode 100644 index 000000000000..96a9d1771cb7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ConnectionUrlTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ConnectionUrlType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ConnectionUrlType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ConnectionUrlType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.cs new file mode 100644 index 000000000000..ce2b69b3f6aa --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + public partial class ConnectionUrlType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlTypeInternal + { + + /// Backing field for property. + private string _apexUrl; + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ApexUrl { get => this._apexUrl; set => this._apexUrl = value; } + + /// Backing field for property. + private string _databaseTransformsUrl; + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DatabaseTransformsUrl { get => this._databaseTransformsUrl; set => this._databaseTransformsUrl = value; } + + /// Backing field for property. + private string _graphStudioUrl; + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string GraphStudioUrl { get => this._graphStudioUrl; set => this._graphStudioUrl = value; } + + /// Backing field for property. + private string _machineLearningNotebookUrl; + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string MachineLearningNotebookUrl { get => this._machineLearningNotebookUrl; set => this._machineLearningNotebookUrl = value; } + + /// Backing field for property. + private string _mongoDbUrl; + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string MongoDbUrl { get => this._mongoDbUrl; set => this._mongoDbUrl = value; } + + /// Backing field for property. + private string _ordsUrl; + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OrdsUrl { get => this._ordsUrl; set => this._ordsUrl = value; } + + /// Backing field for property. + private string _sqlDevWebUrl; + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SqlDevWebUrl { get => this._sqlDevWebUrl; set => this._sqlDevWebUrl = value; } + + /// Creates an new instance. + public ConnectionUrlType() + { + + } + } + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + public partial interface IConnectionUrlType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Oracle Application Express (APEX) URL.", + SerializedName = @"apexUrl", + PossibleTypes = new [] { typeof(string) })] + string ApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The URL of the Database Transforms for the Autonomous Database.", + SerializedName = @"databaseTransformsUrl", + PossibleTypes = new [] { typeof(string) })] + string DatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The URL of the Graph Studio for the Autonomous Database.", + SerializedName = @"graphStudioUrl", + PossibleTypes = new [] { typeof(string) })] + string GraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database.", + SerializedName = @"machineLearningNotebookUrl", + PossibleTypes = new [] { typeof(string) })] + string MachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The URL of the MongoDB API for the Autonomous Database.", + SerializedName = @"mongoDbUrl", + PossibleTypes = new [] { typeof(string) })] + string MongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database.", + SerializedName = @"ordsUrl", + PossibleTypes = new [] { typeof(string) })] + string OrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Oracle SQL Developer Web URL.", + SerializedName = @"sqlDevWebUrl", + PossibleTypes = new [] { typeof(string) })] + string SqlDevWebUrl { get; set; } + + } + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + internal partial interface IConnectionUrlTypeInternal + + { + /// Oracle Application Express (APEX) URL. + string ApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + string DatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + string GraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + string MachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + string MongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + string OrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + string SqlDevWebUrl { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.json.cs new file mode 100644 index 000000000000..cb466d77e6ce --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ConnectionUrlType.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance + /// within your VCN or that has a direct connection to your VCN. + /// + public partial class ConnectionUrlType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ConnectionUrlType(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_apexUrl = If( json?.PropertyT("apexUrl"), out var __jsonApexUrl) ? (string)__jsonApexUrl : (string)_apexUrl;} + {_databaseTransformsUrl = If( json?.PropertyT("databaseTransformsUrl"), out var __jsonDatabaseTransformsUrl) ? (string)__jsonDatabaseTransformsUrl : (string)_databaseTransformsUrl;} + {_graphStudioUrl = If( json?.PropertyT("graphStudioUrl"), out var __jsonGraphStudioUrl) ? (string)__jsonGraphStudioUrl : (string)_graphStudioUrl;} + {_machineLearningNotebookUrl = If( json?.PropertyT("machineLearningNotebookUrl"), out var __jsonMachineLearningNotebookUrl) ? (string)__jsonMachineLearningNotebookUrl : (string)_machineLearningNotebookUrl;} + {_mongoDbUrl = If( json?.PropertyT("mongoDbUrl"), out var __jsonMongoDbUrl) ? (string)__jsonMongoDbUrl : (string)_mongoDbUrl;} + {_ordsUrl = If( json?.PropertyT("ordsUrl"), out var __jsonOrdsUrl) ? (string)__jsonOrdsUrl : (string)_ordsUrl;} + {_sqlDevWebUrl = If( json?.PropertyT("sqlDevWebUrl"), out var __jsonSqlDevWebUrl) ? (string)__jsonSqlDevWebUrl : (string)_sqlDevWebUrl;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IConnectionUrlType FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ConnectionUrlType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._apexUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._apexUrl.ToString()) : null, "apexUrl" ,container.Add ); + AddIf( null != (((object)this._databaseTransformsUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._databaseTransformsUrl.ToString()) : null, "databaseTransformsUrl" ,container.Add ); + AddIf( null != (((object)this._graphStudioUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._graphStudioUrl.ToString()) : null, "graphStudioUrl" ,container.Add ); + AddIf( null != (((object)this._machineLearningNotebookUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._machineLearningNotebookUrl.ToString()) : null, "machineLearningNotebookUrl" ,container.Add ); + AddIf( null != (((object)this._mongoDbUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._mongoDbUrl.ToString()) : null, "mongoDbUrl" ,container.Add ); + AddIf( null != (((object)this._ordsUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ordsUrl.ToString()) : null, "ordsUrl" ,container.Add ); + AddIf( null != (((object)this._sqlDevWebUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._sqlDevWebUrl.ToString()) : null, "sqlDevWebUrl" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.PowerShell.cs new file mode 100644 index 000000000000..2f415bd91e76 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// CustomerContact resource properties + [System.ComponentModel.TypeConverter(typeof(CustomerContactTypeConverter))] + public partial class CustomerContact + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomerContact(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Email")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContactInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContactInternal)this).Email, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomerContact(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Email")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContactInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContactInternal)this).Email, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomerContact(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomerContact(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// CustomerContact resource properties + [System.ComponentModel.TypeConverter(typeof(CustomerContactTypeConverter))] + public partial interface ICustomerContact + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.TypeConverter.cs new file mode 100644 index 000000000000..cc6984092e6a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomerContactTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomerContact.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomerContact.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomerContact.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.cs new file mode 100644 index 000000000000..9270622c1d3f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CustomerContact resource properties + public partial class CustomerContact : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContactInternal + { + + /// Backing field for property. + private string _email; + + /// + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Email { get => this._email; set => this._email = value; } + + /// Creates an new instance. + public CustomerContact() + { + + } + } + /// CustomerContact resource properties + public partial interface ICustomerContact : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The email address used by Oracle to send notifications regarding databases and infrastructure.", + SerializedName = @"email", + PossibleTypes = new [] { typeof(string) })] + string Email { get; set; } + + } + /// CustomerContact resource properties + internal partial interface ICustomerContactInternal + + { + /// + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// + string Email { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.json.cs new file mode 100644 index 000000000000..817c8294cef9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/CustomerContact.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// CustomerContact resource properties + public partial class CustomerContact + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal CustomerContact(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_email = If( json?.PropertyT("email"), out var __jsonEmail) ? (string)__jsonEmail : (string)_email;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new CustomerContact(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._email)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._email.ToString()) : null, "email" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.PowerShell.cs new file mode 100644 index 000000000000..4b2339b57fad --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DataCollectionOptions resource properties + [System.ComponentModel.TypeConverter(typeof(DataCollectionOptionsTypeConverter))] + public partial class DataCollectionOptions + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DataCollectionOptions(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("IsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("IsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled = (bool?) content.GetValueForProperty("IsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DataCollectionOptions(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("IsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("IsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled = (bool?) content.GetValueForProperty("IsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DataCollectionOptions(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DataCollectionOptions(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DataCollectionOptions resource properties + [System.ComponentModel.TypeConverter(typeof(DataCollectionOptionsTypeConverter))] + public partial interface IDataCollectionOptions + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.TypeConverter.cs new file mode 100644 index 000000000000..8d448316ffff --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DataCollectionOptionsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DataCollectionOptions.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DataCollectionOptions.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DataCollectionOptions.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.cs new file mode 100644 index 000000000000..fc72136bef1e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DataCollectionOptions resource properties + public partial class DataCollectionOptions : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptionsInternal + { + + /// Backing field for property. + private bool? _isDiagnosticsEventsEnabled; + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsDiagnosticsEventsEnabled { get => this._isDiagnosticsEventsEnabled; set => this._isDiagnosticsEventsEnabled = value; } + + /// Backing field for property. + private bool? _isHealthMonitoringEnabled; + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsHealthMonitoringEnabled { get => this._isHealthMonitoringEnabled; set => this._isHealthMonitoringEnabled = value; } + + /// Backing field for property. + private bool? _isIncidentLogsEnabled; + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsIncidentLogsEnabled { get => this._isIncidentLogsEnabled; set => this._isIncidentLogsEnabled = value; } + + /// Creates an new instance. + public DataCollectionOptions() + { + + } + } + /// DataCollectionOptions resource properties + public partial interface IDataCollectionOptions : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsIncidentLogsEnabled { get; set; } + + } + /// DataCollectionOptions resource properties + internal partial interface IDataCollectionOptionsInternal + + { + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? IsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? IsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? IsIncidentLogsEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.json.cs new file mode 100644 index 000000000000..7bc811736c11 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DataCollectionOptions.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DataCollectionOptions resource properties + public partial class DataCollectionOptions + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DataCollectionOptions(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_isDiagnosticsEventsEnabled = If( json?.PropertyT("isDiagnosticsEventsEnabled"), out var __jsonIsDiagnosticsEventsEnabled) ? (bool?)__jsonIsDiagnosticsEventsEnabled : _isDiagnosticsEventsEnabled;} + {_isHealthMonitoringEnabled = If( json?.PropertyT("isHealthMonitoringEnabled"), out var __jsonIsHealthMonitoringEnabled) ? (bool?)__jsonIsHealthMonitoringEnabled : _isHealthMonitoringEnabled;} + {_isIncidentLogsEnabled = If( json?.PropertyT("isIncidentLogsEnabled"), out var __jsonIsIncidentLogsEnabled) ? (bool?)__jsonIsIncidentLogsEnabled : _isIncidentLogsEnabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDataCollectionOptions FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DataCollectionOptions(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._isDiagnosticsEventsEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isDiagnosticsEventsEnabled) : null, "isDiagnosticsEventsEnabled" ,container.Add ); + AddIf( null != this._isHealthMonitoringEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isHealthMonitoringEnabled) : null, "isHealthMonitoringEnabled" ,container.Add ); + AddIf( null != this._isIncidentLogsEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isIncidentLogsEnabled) : null, "isIncidentLogsEnabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.PowerShell.cs new file mode 100644 index 000000000000..c693a8c4a72d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekTypeConverter))] + public partial class DayOfWeek + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DayOfWeek(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DayOfWeek(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DayOfWeek(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DayOfWeek(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekTypeConverter))] + public partial interface IDayOfWeek + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.TypeConverter.cs new file mode 100644 index 000000000000..d6b212a09394 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DayOfWeekTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DayOfWeek.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DayOfWeek.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DayOfWeek.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.cs new file mode 100644 index 000000000000..346aae2dc8c6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeek : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekInternal + { + + /// Backing field for property. + private string _name; + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DayOfWeek() + { + + } + } + /// DayOfWeek resource properties + public partial interface IDayOfWeek : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string Name { get; set; } + + } + /// DayOfWeek resource properties + internal partial interface IDayOfWeekInternal + + { + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.json.cs new file mode 100644 index 000000000000..a1a194efdfff --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeek.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeek + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DayOfWeek(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DayOfWeek(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.PowerShell.cs new file mode 100644 index 000000000000..1ab1e7a38579 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekUpdateTypeConverter))] + public partial class DayOfWeekUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DayOfWeekUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdateInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DayOfWeekUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdateInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DayOfWeekUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DayOfWeekUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekUpdateTypeConverter))] + public partial interface IDayOfWeekUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.TypeConverter.cs new file mode 100644 index 000000000000..09d1354c4e20 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DayOfWeekUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DayOfWeekUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DayOfWeekUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DayOfWeekUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.cs new file mode 100644 index 000000000000..29055c29f89e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeekUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdateInternal + { + + /// Backing field for property. + private string _name; + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DayOfWeekUpdate() + { + + } + } + /// DayOfWeek resource properties + public partial interface IDayOfWeekUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string Name { get; set; } + + } + /// DayOfWeek resource properties + internal partial interface IDayOfWeekUpdateInternal + + { + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.json.cs new file mode 100644 index 000000000000..87deedb3c7b5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DayOfWeekUpdate.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeekUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DayOfWeekUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DayOfWeekUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.PowerShell.cs new file mode 100644 index 000000000000..ed0d9759bf7f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DbIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(DbIormConfigTypeConverter))] + public partial class DbIormConfig + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbIormConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).DbName = (string) content.GetValueForProperty("DbName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).DbName, global::System.Convert.ToString); + } + if (content.Contains("FlashCacheLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).FlashCacheLimit = (string) content.GetValueForProperty("FlashCacheLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).FlashCacheLimit, global::System.Convert.ToString); + } + if (content.Contains("Share")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).Share = (int?) content.GetValueForProperty("Share",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).Share, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbIormConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).DbName = (string) content.GetValueForProperty("DbName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).DbName, global::System.Convert.ToString); + } + if (content.Contains("FlashCacheLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).FlashCacheLimit = (string) content.GetValueForProperty("FlashCacheLimit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).FlashCacheLimit, global::System.Convert.ToString); + } + if (content.Contains("Share")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).Share = (int?) content.GetValueForProperty("Share",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal)this).Share, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbIormConfig(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbIormConfig(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DbIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(DbIormConfigTypeConverter))] + public partial interface IDbIormConfig + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.TypeConverter.cs new file mode 100644 index 000000000000..2f93407b83e8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbIormConfigTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbIormConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbIormConfig.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbIormConfig.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.cs new file mode 100644 index 000000000000..be161d1b1c48 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbIormConfig for cloud vm cluster + public partial class DbIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfigInternal + { + + /// Backing field for property. + private string _dbName; + + /// The database name. For the default DbPlan, the dbName is default. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbName { get => this._dbName; set => this._dbName = value; } + + /// Backing field for property. + private string _flashCacheLimit; + + /// + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string FlashCacheLimit { get => this._flashCacheLimit; set => this._flashCacheLimit = value; } + + /// Backing field for property. + private int? _share; + + /// The relative priority of this database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? Share { get => this._share; set => this._share = value; } + + /// Creates an new instance. + public DbIormConfig() + { + + } + } + /// DbIormConfig for cloud vm cluster + public partial interface IDbIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The database name. For the default DbPlan, the dbName is default. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The database name. For the default DbPlan, the dbName is default.", + SerializedName = @"dbName", + PossibleTypes = new [] { typeof(string) })] + string DbName { get; set; } + /// + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The flash cache limit for this database. This value is internally configured based on the share value assigned to the database.", + SerializedName = @"flashCacheLimit", + PossibleTypes = new [] { typeof(string) })] + string FlashCacheLimit { get; set; } + /// The relative priority of this database. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The relative priority of this database.", + SerializedName = @"share", + PossibleTypes = new [] { typeof(int) })] + int? Share { get; set; } + + } + /// DbIormConfig for cloud vm cluster + internal partial interface IDbIormConfigInternal + + { + /// The database name. For the default DbPlan, the dbName is default. + string DbName { get; set; } + /// + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the + /// database. + /// + string FlashCacheLimit { get; set; } + /// The relative priority of this database. + int? Share { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.json.cs new file mode 100644 index 000000000000..d0bd8d27272c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbIormConfig.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbIormConfig for cloud vm cluster + public partial class DbIormConfig + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbIormConfig(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbName = If( json?.PropertyT("dbName"), out var __jsonDbName) ? (string)__jsonDbName : (string)_dbName;} + {_flashCacheLimit = If( json?.PropertyT("flashCacheLimit"), out var __jsonFlashCacheLimit) ? (string)__jsonFlashCacheLimit : (string)_flashCacheLimit;} + {_share = If( json?.PropertyT("share"), out var __jsonShare) ? (int?)__jsonShare : _share;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbIormConfig(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._dbName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbName.ToString()) : null, "dbName" ,container.Add ); + AddIf( null != (((object)this._flashCacheLimit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._flashCacheLimit.ToString()) : null, "flashCacheLimit" ,container.Add ); + AddIf( null != this._share ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._share) : null, "share" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.PowerShell.cs new file mode 100644 index 000000000000..0695dff9298a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.PowerShell.cs @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The DbNode resource belonging to vmCluster + [System.ComponentModel.TypeConverter(typeof(DbNodeTypeConverter))] + public partial class DbNode + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNode(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNode(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNode(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNode(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The DbNode resource belonging to vmCluster + [System.ComponentModel.TypeConverter(typeof(DbNodeTypeConverter))] + public partial interface IDbNode + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.TypeConverter.cs new file mode 100644 index 000000000000..3cb06f7ca71f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNode.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNode.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNode.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.cs new file mode 100644 index 000000000000..f7a056f5b61e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.cs @@ -0,0 +1,601 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The DbNode resource belonging to vmCluster + public partial class DbNode : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string AdditionalDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).AdditionalDetail; } + + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string BackupIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupIPId; } + + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string BackupVnic2Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupVnic2Id; } + + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string BackupVnicId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupVnicId; } + + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).CpuCoreCount; } + + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbServerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbServerId; } + + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbSystemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbSystemId; } + + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string FaultDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).FaultDomain; } + + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string HostIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).HostIPId; } + + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Hostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Hostname; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).LifecycleDetail; } + + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).LifecycleState; } + + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string MaintenanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).MaintenanceType; } + + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).MemorySizeInGb; } + + /// Internal Acessors for AdditionalDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.AdditionalDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).AdditionalDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).AdditionalDetail = value; } + + /// Internal Acessors for BackupIPId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.BackupIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupIPId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupIPId = value; } + + /// Internal Acessors for BackupVnic2Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.BackupVnic2Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupVnic2Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupVnic2Id = value; } + + /// Internal Acessors for BackupVnicId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.BackupVnicId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupVnicId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).BackupVnicId = value; } + + /// Internal Acessors for CpuCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).CpuCoreCount = value; } + + /// Internal Acessors for DbServerId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.DbServerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbServerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbServerId = value; } + + /// Internal Acessors for DbSystemId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.DbSystemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbSystemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbSystemId = value; } + + /// Internal Acessors for FaultDomain + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.FaultDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).FaultDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).FaultDomain = value; } + + /// Internal Acessors for HostIPId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.HostIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).HostIPId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).HostIPId = value; } + + /// Internal Acessors for Hostname + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.Hostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Hostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Hostname = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for MaintenanceType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.MaintenanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).MaintenanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).MaintenanceType = value; } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).MemorySizeInGb = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SoftwareStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.SoftwareStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).SoftwareStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).SoftwareStorageSizeInGb = value; } + + /// Internal Acessors for StorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.StorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbNodeStorageSizeInGb = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for TimeMaintenanceWindowEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.TimeMaintenanceWindowEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowEnd = value; } + + /// Internal Acessors for TimeMaintenanceWindowStart + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.TimeMaintenanceWindowStart { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowStart; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowStart = value; } + + /// Internal Acessors for Vnic2Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.Vnic2Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Vnic2Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Vnic2Id = value; } + + /// Internal Acessors for VnicId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeInternal.VnicId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).VnicId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).VnicId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? SoftwareStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).SoftwareStorageSizeInGb; } + + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? StorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).DbNodeStorageSizeInGb; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeCreated; } + + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceWindowEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowEnd; } + + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceWindowStart { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowStart; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Vnic2Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).Vnic2Id; } + + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string VnicId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)Property).VnicId; } + + /// Creates an new instance. + public DbNode() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// The DbNode resource belonging to vmCluster + public partial interface IDbNode : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the planned maintenance.", + SerializedName = @"additionalDetails", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; } + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the backup IP address associated with the database node.", + SerializedName = @"backupIpId", + PossibleTypes = new [] { typeof(string) })] + string BackupIPId { get; } + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the second backup VNIC.", + SerializedName = @"backupVnic2Id", + PossibleTypes = new [] { typeof(string) })] + string BackupVnic2Id { get; } + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the backup VNIC.", + SerializedName = @"backupVnicId", + PossibleTypes = new [] { typeof(string) })] + string BackupVnicId { get; } + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of CPU cores enabled on the Db node.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; } + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Exacc Db server associated with the database node.", + SerializedName = @"dbServerId", + PossibleTypes = new [] { typeof(string) })] + string DbServerId { get; } + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the DB system.", + SerializedName = @"dbSystemId", + PossibleTypes = new [] { typeof(string) })] + string DbSystemId { get; } + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the Fault Domain the instance is contained in.", + SerializedName = @"faultDomain", + PossibleTypes = new [] { typeof(string) })] + string FaultDomain { get; } + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the host IP address associated with the database node.", + SerializedName = @"hostIpId", + PossibleTypes = new [] { typeof(string) })] + string HostIPId { get; } + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The host name for the database node.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; } + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Lifecycle details of Db Node.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of the database node.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; } + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of database node maintenance.", + SerializedName = @"maintenanceType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("VmdbRebootMigration")] + string MaintenanceType { get; } + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The allocated memory in GBs on the Db node.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"DbNode OCID", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.", + SerializedName = @"softwareStorageSizeInGb", + PossibleTypes = new [] { typeof(int) })] + int? SoftwareStorageSizeInGb { get; } + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The allocated local node storage in GBs on the Db node.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; } + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the database node was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowEnd { get; } + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowStart", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowStart { get; } + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the second VNIC.", + SerializedName = @"vnic2Id", + PossibleTypes = new [] { typeof(string) })] + string Vnic2Id { get; } + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the VNIC.", + SerializedName = @"vnicId", + PossibleTypes = new [] { typeof(string) })] + string VnicId { get; } + + } + /// The DbNode resource belonging to vmCluster + internal partial interface IDbNodeInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// Additional information about the planned maintenance. + string AdditionalDetail { get; set; } + /// The OCID of the backup IP address associated with the database node. + string BackupIPId { get; set; } + /// The OCID of the second backup VNIC. + string BackupVnic2Id { get; set; } + /// The OCID of the backup VNIC. + string BackupVnicId { get; set; } + /// The number of CPU cores enabled on the Db node. + int? CpuCoreCount { get; set; } + /// The OCID of the Exacc Db server associated with the database node. + string DbServerId { get; set; } + /// The OCID of the DB system. + string DbSystemId { get; set; } + /// The name of the Fault Domain the instance is contained in. + string FaultDomain { get; set; } + /// The OCID of the host IP address associated with the database node. + string HostIPId { get; set; } + /// The host name for the database node. + string Hostname { get; set; } + /// Lifecycle details of Db Node. + string LifecycleDetail { get; set; } + /// The current state of the database node. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; set; } + /// The type of database node maintenance. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("VmdbRebootMigration")] + string MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + int? MemorySizeInGb { get; set; } + /// DbNode OCID + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties Property { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + int? SoftwareStorageSizeInGb { get; set; } + /// The allocated local node storage in GBs on the Db node. + int? StorageSizeInGb { get; set; } + /// The date and time that the database node was created. + global::System.DateTime? TimeCreated { get; set; } + /// End date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The OCID of the second VNIC. + string Vnic2Id { get; set; } + /// The OCID of the VNIC. + string VnicId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.json.cs new file mode 100644 index 000000000000..67ab055d3213 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNode.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The DbNode resource belonging to vmCluster + public partial class DbNode + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbNode(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbNode(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.PowerShell.cs new file mode 100644 index 000000000000..e0b7004cc950 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DbNode action object + [System.ComponentModel.TypeConverter(typeof(DbNodeActionTypeConverter))] + public partial class DbNodeAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodeAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeActionInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeActionInternal)this).Action, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodeAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeActionInternal)this).Action = (string) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeActionInternal)this).Action, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodeAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodeAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DbNode action object + [System.ComponentModel.TypeConverter(typeof(DbNodeActionTypeConverter))] + public partial interface IDbNodeAction + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.TypeConverter.cs new file mode 100644 index 000000000000..76deb5952e99 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodeActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodeAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodeAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodeAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.cs new file mode 100644 index 000000000000..dab276d9b50e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbNode action object + public partial class DbNodeAction : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeActionInternal + { + + /// Backing field for property. + private string _action; + + /// Db action + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Action { get => this._action; set => this._action = value; } + + /// Creates an new instance. + public DbNodeAction() + { + + } + } + /// DbNode action object + public partial interface IDbNodeAction : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Db action + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Start", "Stop", "SoftReset", "Reset")] + string Action { get; set; } + + } + /// DbNode action object + internal partial interface IDbNodeActionInternal + + { + /// Db action + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Start", "Stop", "SoftReset", "Reset")] + string Action { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.json.cs new file mode 100644 index 000000000000..21e0ac31cddb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeAction.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbNode action object + public partial class DbNodeAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodeAction(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)_action;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbNodeAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._action)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._action.ToString()) : null, "action" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.PowerShell.cs new file mode 100644 index 000000000000..5f540438f8f1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a DbNode list operation. + [System.ComponentModel.TypeConverter(typeof(DbNodeListResultTypeConverter))] + public partial class DbNodeListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodeListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodeListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodeListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodeListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a DbNode list operation. + [System.ComponentModel.TypeConverter(typeof(DbNodeListResultTypeConverter))] + public partial interface IDbNodeListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.TypeConverter.cs new file mode 100644 index 000000000000..d3f0053f9c00 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodeListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodeListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodeListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodeListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.cs new file mode 100644 index 000000000000..897e348eba34 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DbNode list operation. + public partial class DbNodeListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The DbNode items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DbNodeListResult() + { + + } + } + /// The response of a DbNode list operation. + public partial interface IDbNodeListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DbNode items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DbNode items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a DbNode list operation. + internal partial interface IDbNodeListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DbNode items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.json.cs new file mode 100644 index 000000000000..fb9544e43b39 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DbNode list operation. + public partial class DbNodeListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodeListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNode.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbNodeListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.PowerShell.cs new file mode 100644 index 000000000000..223d7e40b452 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.PowerShell.cs @@ -0,0 +1,340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The properties of DbNodeResource + [System.ComponentModel.TypeConverter(typeof(DbNodePropertiesTypeConverter))] + public partial class DbNodeProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodeProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodeProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodeProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodeProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The properties of DbNodeResource + [System.ComponentModel.TypeConverter(typeof(DbNodePropertiesTypeConverter))] + public partial interface IDbNodeProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.TypeConverter.cs new file mode 100644 index 000000000000..ebf794d99c24 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodeProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodeProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodeProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.cs new file mode 100644 index 000000000000..7a14853663d9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.cs @@ -0,0 +1,578 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The properties of DbNodeResource + public partial class DbNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal + { + + /// Backing field for property. + private string _additionalDetail; + + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string AdditionalDetail { get => this._additionalDetail; } + + /// Backing field for property. + private string _backupIPId; + + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string BackupIPId { get => this._backupIPId; } + + /// Backing field for property. + private string _backupVnic2Id; + + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string BackupVnic2Id { get => this._backupVnic2Id; } + + /// Backing field for property. + private string _backupVnicId; + + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string BackupVnicId { get => this._backupVnicId; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; } + + /// Backing field for property. + private string _dbServerId; + + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbServerId { get => this._dbServerId; } + + /// Backing field for property. + private string _dbSystemId; + + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DbSystemId { get => this._dbSystemId; } + + /// Backing field for property. + private string _faultDomain; + + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string FaultDomain { get => this._faultDomain; } + + /// Backing field for property. + private string _hostIPId; + + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string HostIPId { get => this._hostIPId; } + + /// Backing field for property. + private string _hostname; + + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Hostname { get => this._hostname; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private string _lifecycleState; + + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private string _maintenanceType; + + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string MaintenanceType { get => this._maintenanceType; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; } + + /// Internal Acessors for AdditionalDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.AdditionalDetail { get => this._additionalDetail; set { {_additionalDetail = value;} } } + + /// Internal Acessors for BackupIPId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.BackupIPId { get => this._backupIPId; set { {_backupIPId = value;} } } + + /// Internal Acessors for BackupVnic2Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.BackupVnic2Id { get => this._backupVnic2Id; set { {_backupVnic2Id = value;} } } + + /// Internal Acessors for BackupVnicId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.BackupVnicId { get => this._backupVnicId; set { {_backupVnicId = value;} } } + + /// Internal Acessors for CpuCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.CpuCoreCount { get => this._cpuCoreCount; set { {_cpuCoreCount = value;} } } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set { {_dbNodeStorageSizeInGb = value;} } } + + /// Internal Acessors for DbServerId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.DbServerId { get => this._dbServerId; set { {_dbServerId = value;} } } + + /// Internal Acessors for DbSystemId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.DbSystemId { get => this._dbSystemId; set { {_dbSystemId = value;} } } + + /// Internal Acessors for FaultDomain + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.FaultDomain { get => this._faultDomain; set { {_faultDomain = value;} } } + + /// Internal Acessors for HostIPId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.HostIPId { get => this._hostIPId; set { {_hostIPId = value;} } } + + /// Internal Acessors for Hostname + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.Hostname { get => this._hostname; set { {_hostname = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for MaintenanceType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.MaintenanceType { get => this._maintenanceType; set { {_maintenanceType = value;} } } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.MemorySizeInGb { get => this._memorySizeInGb; set { {_memorySizeInGb = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SoftwareStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.SoftwareStorageSizeInGb { get => this._softwareStorageSizeInGb; set { {_softwareStorageSizeInGb = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for TimeMaintenanceWindowEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.TimeMaintenanceWindowEnd { get => this._timeMaintenanceWindowEnd; set { {_timeMaintenanceWindowEnd = value;} } } + + /// Internal Acessors for TimeMaintenanceWindowStart + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.TimeMaintenanceWindowStart { get => this._timeMaintenanceWindowStart; set { {_timeMaintenanceWindowStart = value;} } } + + /// Internal Acessors for Vnic2Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.Vnic2Id { get => this._vnic2Id; set { {_vnic2Id = value;} } } + + /// Internal Acessors for VnicId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodePropertiesInternal.VnicId { get => this._vnicId; set { {_vnicId = value;} } } + + /// Backing field for property. + private string _ocid; + + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private int? _softwareStorageSizeInGb; + + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? SoftwareStorageSizeInGb { get => this._softwareStorageSizeInGb; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceWindowEnd; + + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceWindowEnd { get => this._timeMaintenanceWindowEnd; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceWindowStart; + + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceWindowStart { get => this._timeMaintenanceWindowStart; } + + /// Backing field for property. + private string _vnic2Id; + + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Vnic2Id { get => this._vnic2Id; } + + /// Backing field for property. + private string _vnicId; + + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string VnicId { get => this._vnicId; } + + /// Creates an new instance. + public DbNodeProperties() + { + + } + } + /// The properties of DbNodeResource + public partial interface IDbNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the planned maintenance.", + SerializedName = @"additionalDetails", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; } + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the backup IP address associated with the database node.", + SerializedName = @"backupIpId", + PossibleTypes = new [] { typeof(string) })] + string BackupIPId { get; } + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the second backup VNIC.", + SerializedName = @"backupVnic2Id", + PossibleTypes = new [] { typeof(string) })] + string BackupVnic2Id { get; } + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the backup VNIC.", + SerializedName = @"backupVnicId", + PossibleTypes = new [] { typeof(string) })] + string BackupVnicId { get; } + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of CPU cores enabled on the Db node.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; } + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The allocated local node storage in GBs on the Db node.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Exacc Db server associated with the database node.", + SerializedName = @"dbServerId", + PossibleTypes = new [] { typeof(string) })] + string DbServerId { get; } + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the DB system.", + SerializedName = @"dbSystemId", + PossibleTypes = new [] { typeof(string) })] + string DbSystemId { get; } + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the Fault Domain the instance is contained in.", + SerializedName = @"faultDomain", + PossibleTypes = new [] { typeof(string) })] + string FaultDomain { get; } + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the host IP address associated with the database node.", + SerializedName = @"hostIpId", + PossibleTypes = new [] { typeof(string) })] + string HostIPId { get; } + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The host name for the database node.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; } + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Lifecycle details of Db Node.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current state of the database node.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; } + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of database node maintenance.", + SerializedName = @"maintenanceType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("VmdbRebootMigration")] + string MaintenanceType { get; } + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The allocated memory in GBs on the Db node.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"DbNode OCID", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.", + SerializedName = @"softwareStorageSizeInGb", + PossibleTypes = new [] { typeof(int) })] + int? SoftwareStorageSizeInGb { get; } + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the database node was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"End date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowEnd { get; } + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Start date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowStart", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowStart { get; } + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the second VNIC.", + SerializedName = @"vnic2Id", + PossibleTypes = new [] { typeof(string) })] + string Vnic2Id { get; } + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the VNIC.", + SerializedName = @"vnicId", + PossibleTypes = new [] { typeof(string) })] + string VnicId { get; } + + } + /// The properties of DbNodeResource + internal partial interface IDbNodePropertiesInternal + + { + /// Additional information about the planned maintenance. + string AdditionalDetail { get; set; } + /// The OCID of the backup IP address associated with the database node. + string BackupIPId { get; set; } + /// The OCID of the second backup VNIC. + string BackupVnic2Id { get; set; } + /// The OCID of the backup VNIC. + string BackupVnicId { get; set; } + /// The number of CPU cores enabled on the Db node. + int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + int? DbNodeStorageSizeInGb { get; set; } + /// The OCID of the Exacc Db server associated with the database node. + string DbServerId { get; set; } + /// The OCID of the DB system. + string DbSystemId { get; set; } + /// The name of the Fault Domain the instance is contained in. + string FaultDomain { get; set; } + /// The OCID of the host IP address associated with the database node. + string HostIPId { get; set; } + /// The host name for the database node. + string Hostname { get; set; } + /// Lifecycle details of Db Node. + string LifecycleDetail { get; set; } + /// The current state of the database node. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Updating", "Stopping", "Stopped", "Starting", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; set; } + /// The type of database node maintenance. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("VmdbRebootMigration")] + string MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + int? MemorySizeInGb { get; set; } + /// DbNode OCID + string Ocid { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + int? SoftwareStorageSizeInGb { get; set; } + /// The date and time that the database node was created. + global::System.DateTime? TimeCreated { get; set; } + /// End date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The OCID of the second VNIC. + string Vnic2Id { get; set; } + /// The OCID of the VNIC. + string VnicId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.json.cs new file mode 100644 index 000000000000..dc5e2cf5b9a6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbNodeProperties.json.cs @@ -0,0 +1,221 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The properties of DbNodeResource + public partial class DbNodeProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodeProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_additionalDetail = If( json?.PropertyT("additionalDetails"), out var __jsonAdditionalDetails) ? (string)__jsonAdditionalDetails : (string)_additionalDetail;} + {_backupIPId = If( json?.PropertyT("backupIpId"), out var __jsonBackupIPId) ? (string)__jsonBackupIPId : (string)_backupIPId;} + {_backupVnic2Id = If( json?.PropertyT("backupVnic2Id"), out var __jsonBackupVnic2Id) ? (string)__jsonBackupVnic2Id : (string)_backupVnic2Id;} + {_backupVnicId = If( json?.PropertyT("backupVnicId"), out var __jsonBackupVnicId) ? (string)__jsonBackupVnicId : (string)_backupVnicId;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : _cpuCoreCount;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : _dbNodeStorageSizeInGb;} + {_dbServerId = If( json?.PropertyT("dbServerId"), out var __jsonDbServerId) ? (string)__jsonDbServerId : (string)_dbServerId;} + {_dbSystemId = If( json?.PropertyT("dbSystemId"), out var __jsonDbSystemId) ? (string)__jsonDbSystemId : (string)_dbSystemId;} + {_faultDomain = If( json?.PropertyT("faultDomain"), out var __jsonFaultDomain) ? (string)__jsonFaultDomain : (string)_faultDomain;} + {_hostIPId = If( json?.PropertyT("hostIpId"), out var __jsonHostIPId) ? (string)__jsonHostIPId : (string)_hostIPId;} + {_hostname = If( json?.PropertyT("hostname"), out var __jsonHostname) ? (string)__jsonHostname : (string)_hostname;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_maintenanceType = If( json?.PropertyT("maintenanceType"), out var __jsonMaintenanceType) ? (string)__jsonMaintenanceType : (string)_maintenanceType;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : _memorySizeInGb;} + {_softwareStorageSizeInGb = If( json?.PropertyT("softwareStorageSizeInGb"), out var __jsonSoftwareStorageSizeInGb) ? (int?)__jsonSoftwareStorageSizeInGb : _softwareStorageSizeInGb;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : _timeCreated : _timeCreated;} + {_timeMaintenanceWindowEnd = If( json?.PropertyT("timeMaintenanceWindowEnd"), out var __jsonTimeMaintenanceWindowEnd) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceWindowEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceWindowEndValue) ? __jsonTimeMaintenanceWindowEndValue : _timeMaintenanceWindowEnd : _timeMaintenanceWindowEnd;} + {_timeMaintenanceWindowStart = If( json?.PropertyT("timeMaintenanceWindowStart"), out var __jsonTimeMaintenanceWindowStart) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceWindowStart, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceWindowStartValue) ? __jsonTimeMaintenanceWindowStartValue : _timeMaintenanceWindowStart : _timeMaintenanceWindowStart;} + {_vnic2Id = If( json?.PropertyT("vnic2Id"), out var __jsonVnic2Id) ? (string)__jsonVnic2Id : (string)_vnic2Id;} + {_vnicId = If( json?.PropertyT("vnicId"), out var __jsonVnicId) ? (string)__jsonVnicId : (string)_vnicId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbNodeProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._additionalDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._additionalDetail.ToString()) : null, "additionalDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._backupIPId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._backupIPId.ToString()) : null, "backupIpId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._backupVnic2Id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._backupVnic2Id.ToString()) : null, "backupVnic2Id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._backupVnicId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._backupVnicId.ToString()) : null, "backupVnicId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._dbServerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbServerId.ToString()) : null, "dbServerId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._dbSystemId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbSystemId.ToString()) : null, "dbSystemId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._faultDomain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._faultDomain.ToString()) : null, "faultDomain" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._hostIPId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._hostIPId.ToString()) : null, "hostIpId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._hostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._hostname.ToString()) : null, "hostname" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._maintenanceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._maintenanceType.ToString()) : null, "maintenanceType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._softwareStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._softwareStorageSizeInGb) : null, "softwareStorageSizeInGb" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeMaintenanceWindowEnd ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeMaintenanceWindowEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceWindowEnd" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeMaintenanceWindowStart ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeMaintenanceWindowStart?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceWindowStart" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._vnic2Id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._vnic2Id.ToString()) : null, "vnic2Id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._vnicId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._vnicId.ToString()) : null, "vnicId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.PowerShell.cs new file mode 100644 index 000000000000..b687c3abb00d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.PowerShell.cs @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DbServer resource model + [System.ComponentModel.TypeConverter(typeof(DbServerTypeConverter))] + public partial class DbServer + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServer(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("PatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails) content.GetValueForProperty("PatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).VMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeId = (System.Collections.Generic.List) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVirtualMachineId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("PatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailPatchingStatus = (string) content.GetValueForProperty("PatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailPatchingStatus, global::System.Convert.ToString); + } + if (content.Contains("PatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServer(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("PatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails) content.GetValueForProperty("PatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).VMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeId = (System.Collections.Generic.List) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVirtualMachineId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("PatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("PatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailPatchingStatus = (string) content.GetValueForProperty("PatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailPatchingStatus, global::System.Convert.ToString); + } + if (content.Contains("PatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal)this).PatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServer(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServer(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DbServer resource model + [System.ComponentModel.TypeConverter(typeof(DbServerTypeConverter))] + public partial interface IDbServer + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.TypeConverter.cs new file mode 100644 index 000000000000..cf20fab0fc3a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServer.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServer.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServer.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.cs new file mode 100644 index 000000000000..af9d8be1dceb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbServer resource model + public partial class DbServer : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AutonomousVMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).AutonomousVMClusterId; } + + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AutonomousVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).AutonomousVirtualMachineId; } + + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).CompartmentId; } + + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).CpuCoreCount; } + + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List DbNodeId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbNodeId; } + + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbNodeStorageSizeInGb; } + + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DisplayName; } + + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ExadataInfrastructureId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).ExadataInfrastructureId; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).LifecycleDetail; } + + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).LifecycleState; } + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxCpuCount; } + + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaxDbNodeStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxDbNodeStorageInGb; } + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxMemoryInGb; } + + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MemorySizeInGb; } + + /// Internal Acessors for AutonomousVMClusterId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.AutonomousVMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).AutonomousVMClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).AutonomousVMClusterId = value; } + + /// Internal Acessors for AutonomousVirtualMachineId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.AutonomousVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).AutonomousVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).AutonomousVirtualMachineId = value; } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).CompartmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).CompartmentId = value; } + + /// Internal Acessors for CpuCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).CpuCoreCount = value; } + + /// Internal Acessors for DbNodeId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.DbNodeId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbNodeId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbNodeId = value; } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbNodeStorageSizeInGb = value; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DisplayName = value; } + + /// Internal Acessors for ExadataInfrastructureId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.ExadataInfrastructureId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).ExadataInfrastructureId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).ExadataInfrastructureId = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxCpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxCpuCount = value; } + + /// Internal Acessors for MaxDbNodeStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.MaxDbNodeStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxDbNodeStorageInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxDbNodeStorageInGb = value; } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxMemoryInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MaxMemoryInGb = value; } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).MemorySizeInGb = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for PatchingDetail + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.PatchingDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetail = value; } + + /// Internal Acessors for PatchingDetailEstimatedPatchDuration + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.PatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailEstimatedPatchDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailEstimatedPatchDuration = value; } + + /// Internal Acessors for PatchingDetailPatchingStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.PatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailPatchingStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailPatchingStatus = value; } + + /// Internal Acessors for PatchingDetailTimePatchingEnded + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.PatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingEnded; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingEnded = value; } + + /// Internal Acessors for PatchingDetailTimePatchingStarted + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.PatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingStarted; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingStarted = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).Shape = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for VMClusterId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerInternal.VMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).VMClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).VMClusterId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).Ocid; } + + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? PatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailEstimatedPatchDuration; } + + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailPatchingStatus; } + + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? PatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingEnded; } + + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? PatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingStarted; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).Shape; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).TimeCreated; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List VMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)Property).VMClusterId; } + + /// Creates an new instance. + public DbServer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// DbServer resource model + public partial interface IDbServer : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of OCIDs of the Autonomous VM Clusters associated with the Db server.", + SerializedName = @"autonomousVmClusterIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List AutonomousVMClusterId { get; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.", + SerializedName = @"autonomousVirtualMachineIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List AutonomousVirtualMachineId { get; } + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the compartment.", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of CPU cores enabled on the Db server.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; } + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Db nodes associated with the Db server.", + SerializedName = @"dbNodeIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List DbNodeId { get; } + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The allocated local node storage in GBs on the Db server.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name for the Db Server.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Exadata infrastructure.", + SerializedName = @"exadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string ExadataInfrastructureId { get; } + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Lifecycle details of dbServer.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"DbServer provisioning state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Available", "Unavailable", "Deleting", "Deleted", "MaintenanceInProgress")] + string LifecycleState { get; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total max dbNode storage in GBs.", + SerializedName = @"maxDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total memory size in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Db server name.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Estimated Patch Duration", + SerializedName = @"estimatedPatchDuration", + PossibleTypes = new [] { typeof(int) })] + int? PatchingDetailEstimatedPatchDuration { get; } + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Patching Status", + SerializedName = @"patchingStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Scheduled", "MaintenanceInProgress", "Failed", "Complete")] + string PatchingDetailPatchingStatus { get; } + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time Patching Ended", + SerializedName = @"timePatchingEnded", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PatchingDetailTimePatchingEnded { get; } + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time Patching Started", + SerializedName = @"timePatchingStarted", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PatchingDetailTimePatchingStarted { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the Db Server was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the VM Clusters associated with the Db server.", + SerializedName = @"vmClusterIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List VMClusterId { get; } + + } + /// DbServer resource model + internal partial interface IDbServerInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + System.Collections.Generic.List AutonomousVMClusterId { get; set; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + System.Collections.Generic.List AutonomousVirtualMachineId { get; set; } + /// The OCID of the compartment. + string CompartmentId { get; set; } + /// The number of CPU cores enabled on the Db server. + int? CpuCoreCount { get; set; } + /// The OCID of the Db nodes associated with the Db server. + System.Collections.Generic.List DbNodeId { get; set; } + /// The allocated local node storage in GBs on the Db server. + int? DbNodeStorageSizeInGb { get; set; } + /// The name for the Db Server. + string DisplayName { get; set; } + /// The OCID of the Exadata infrastructure. + string ExadataInfrastructureId { get; set; } + /// Lifecycle details of dbServer. + string LifecycleDetail { get; set; } + /// DbServer provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Available", "Unavailable", "Deleting", "Deleted", "MaintenanceInProgress")] + string LifecycleState { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total max dbNode storage in GBs. + int? MaxDbNodeStorageInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The total memory size in GBs. + int? MemorySizeInGb { get; set; } + /// Db server name. + string Ocid { get; set; } + /// dbServerPatching details of the Db server. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails PatchingDetail { get; set; } + /// Estimated Patch Duration + int? PatchingDetailEstimatedPatchDuration { get; set; } + /// Patching Status + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Scheduled", "MaintenanceInProgress", "Failed", "Complete")] + string PatchingDetailPatchingStatus { get; set; } + /// Time Patching Ended + global::System.DateTime? PatchingDetailTimePatchingEnded { get; set; } + /// Time Patching Started + global::System.DateTime? PatchingDetailTimePatchingStarted { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties Property { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + string Shape { get; set; } + /// The date and time that the Db Server was created. + global::System.DateTime? TimeCreated { get; set; } + /// The OCID of the VM Clusters associated with the Db server. + System.Collections.Generic.List VMClusterId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.json.cs new file mode 100644 index 000000000000..b527865efd26 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServer.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbServer resource model + public partial class DbServer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbServer(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbServer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.PowerShell.cs new file mode 100644 index 000000000000..68d6e0de8402 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a DbServer list operation. + [System.ComponentModel.TypeConverter(typeof(DbServerListResultTypeConverter))] + public partial class DbServerListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServerListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServerListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServerListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServerListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a DbServer list operation. + [System.ComponentModel.TypeConverter(typeof(DbServerListResultTypeConverter))] + public partial interface IDbServerListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.TypeConverter.cs new file mode 100644 index 000000000000..72eede27513a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServerListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServerListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServerListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.cs new file mode 100644 index 000000000000..46c26a45b8d1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DbServer list operation. + public partial class DbServerListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The DbServer items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DbServerListResult() + { + + } + } + /// The response of a DbServer list operation. + public partial interface IDbServerListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DbServer items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DbServer items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a DbServer list operation. + internal partial interface IDbServerListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DbServer items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.json.cs new file mode 100644 index 000000000000..a5dfa470fda2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DbServer list operation. + public partial class DbServerListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbServerListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServer.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbServerListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.PowerShell.cs new file mode 100644 index 000000000000..58c265401036 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DbServer Patching Properties + [System.ComponentModel.TypeConverter(typeof(DbServerPatchingDetailsTypeConverter))] + public partial class DbServerPatchingDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServerPatchingDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration = (int?) content.GetValueForProperty("EstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).PatchingStatus = (string) content.GetValueForProperty("PatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).PatchingStatus, global::System.Convert.ToString); + } + if (content.Contains("TimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("TimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("TimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServerPatchingDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration = (int?) content.GetValueForProperty("EstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).PatchingStatus = (string) content.GetValueForProperty("PatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).PatchingStatus, global::System.Convert.ToString); + } + if (content.Contains("TimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("TimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("TimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)this).TimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServerPatchingDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServerPatchingDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DbServer Patching Properties + [System.ComponentModel.TypeConverter(typeof(DbServerPatchingDetailsTypeConverter))] + public partial interface IDbServerPatchingDetails + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.TypeConverter.cs new file mode 100644 index 000000000000..3062b6a7bc77 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerPatchingDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServerPatchingDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServerPatchingDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServerPatchingDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.cs new file mode 100644 index 000000000000..bd54ad772f5c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbServer Patching Properties + public partial class DbServerPatchingDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal + { + + /// Backing field for property. + private int? _estimatedPatchDuration; + + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? EstimatedPatchDuration { get => this._estimatedPatchDuration; } + + /// Internal Acessors for EstimatedPatchDuration + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal.EstimatedPatchDuration { get => this._estimatedPatchDuration; set { {_estimatedPatchDuration = value;} } } + + /// Internal Acessors for PatchingStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal.PatchingStatus { get => this._patchingStatus; set { {_patchingStatus = value;} } } + + /// Internal Acessors for TimePatchingEnded + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal.TimePatchingEnded { get => this._timePatchingEnded; set { {_timePatchingEnded = value;} } } + + /// Internal Acessors for TimePatchingStarted + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal.TimePatchingStarted { get => this._timePatchingStarted; set { {_timePatchingStarted = value;} } } + + /// Backing field for property. + private string _patchingStatus; + + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PatchingStatus { get => this._patchingStatus; } + + /// Backing field for property. + private global::System.DateTime? _timePatchingEnded; + + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimePatchingEnded { get => this._timePatchingEnded; } + + /// Backing field for property. + private global::System.DateTime? _timePatchingStarted; + + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimePatchingStarted { get => this._timePatchingStarted; } + + /// Creates an new instance. + public DbServerPatchingDetails() + { + + } + } + /// DbServer Patching Properties + public partial interface IDbServerPatchingDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Estimated Patch Duration", + SerializedName = @"estimatedPatchDuration", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchDuration { get; } + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Patching Status", + SerializedName = @"patchingStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Scheduled", "MaintenanceInProgress", "Failed", "Complete")] + string PatchingStatus { get; } + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time Patching Ended", + SerializedName = @"timePatchingEnded", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimePatchingEnded { get; } + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time Patching Started", + SerializedName = @"timePatchingStarted", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimePatchingStarted { get; } + + } + /// DbServer Patching Properties + internal partial interface IDbServerPatchingDetailsInternal + + { + /// Estimated Patch Duration + int? EstimatedPatchDuration { get; set; } + /// Patching Status + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Scheduled", "MaintenanceInProgress", "Failed", "Complete")] + string PatchingStatus { get; set; } + /// Time Patching Ended + global::System.DateTime? TimePatchingEnded { get; set; } + /// Time Patching Started + global::System.DateTime? TimePatchingStarted { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.json.cs new file mode 100644 index 000000000000..e5a4fcd2efe3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerPatchingDetails.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbServer Patching Properties + public partial class DbServerPatchingDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbServerPatchingDetails(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_estimatedPatchDuration = If( json?.PropertyT("estimatedPatchDuration"), out var __jsonEstimatedPatchDuration) ? (int?)__jsonEstimatedPatchDuration : _estimatedPatchDuration;} + {_patchingStatus = If( json?.PropertyT("patchingStatus"), out var __jsonPatchingStatus) ? (string)__jsonPatchingStatus : (string)_patchingStatus;} + {_timePatchingEnded = If( json?.PropertyT("timePatchingEnded"), out var __jsonTimePatchingEnded) ? global::System.DateTime.TryParse((string)__jsonTimePatchingEnded, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimePatchingEndedValue) ? __jsonTimePatchingEndedValue : _timePatchingEnded : _timePatchingEnded;} + {_timePatchingStarted = If( json?.PropertyT("timePatchingStarted"), out var __jsonTimePatchingStarted) ? global::System.DateTime.TryParse((string)__jsonTimePatchingStarted, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimePatchingStartedValue) ? __jsonTimePatchingStartedValue : _timePatchingStarted : _timePatchingStarted;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbServerPatchingDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._estimatedPatchDuration ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._estimatedPatchDuration) : null, "estimatedPatchDuration" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._patchingStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._patchingStatus.ToString()) : null, "patchingStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timePatchingEnded ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timePatchingEnded?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timePatchingEnded" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timePatchingStarted ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timePatchingStarted?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timePatchingStarted" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.PowerShell.cs new file mode 100644 index 000000000000..672d64167b0d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.PowerShell.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DbServer resource properties + [System.ComponentModel.TypeConverter(typeof(DbServerPropertiesTypeConverter))] + public partial class DbServerProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServerProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServerPatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails) content.GetValueForProperty("DbServerPatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).VMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeId = (System.Collections.Generic.List) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DbServerPatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("DbServerPatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerPatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus = (string) content.GetValueForProperty("DbServerPatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus, global::System.Convert.ToString); + } + if (content.Contains("DbServerPatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DbServerPatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServerProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServerPatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails) content.GetValueForProperty("DbServerPatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).VMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeId = (System.Collections.Generic.List) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVMClusterId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId = (System.Collections.Generic.List) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("DbServerPatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("DbServerPatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerPatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus = (string) content.GetValueForProperty("DbServerPatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus, global::System.Convert.ToString); + } + if (content.Contains("DbServerPatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DbServerPatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServerProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServerProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DbServer resource properties + [System.ComponentModel.TypeConverter(typeof(DbServerPropertiesTypeConverter))] + public partial interface IDbServerProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.TypeConverter.cs new file mode 100644 index 000000000000..6c7fa552d749 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServerProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServerProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServerProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.cs new file mode 100644 index 000000000000..724a3e57c29c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.cs @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbServer resource properties + public partial class DbServerProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _autonomousVMClusterId; + + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List AutonomousVMClusterId { get => this._autonomousVMClusterId; } + + /// Backing field for property. + private System.Collections.Generic.List _autonomousVirtualMachineId; + + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List AutonomousVirtualMachineId { get => this._autonomousVirtualMachineId; } + + /// Backing field for property. + private string _compartmentId; + + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CompartmentId { get => this._compartmentId; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; } + + /// Backing field for property. + private System.Collections.Generic.List _dbNodeId; + + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List DbNodeId { get => this._dbNodeId; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails _dbServerPatchingDetail; + + /// dbServerPatching details of the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails DbServerPatchingDetail { get => (this._dbServerPatchingDetail = this._dbServerPatchingDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetails()); } + + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DbServerPatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).EstimatedPatchDuration; } + + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DbServerPatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).PatchingStatus; } + + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? DbServerPatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingEnded; } + + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? DbServerPatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingStarted; } + + /// Backing field for property. + private string _displayName; + + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Backing field for property. + private string _exadataInfrastructureId; + + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ExadataInfrastructureId { get => this._exadataInfrastructureId; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private string _lifecycleState; + + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private int? _maxCpuCount; + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaxCpuCount { get => this._maxCpuCount; } + + /// Backing field for property. + private int? _maxDbNodeStorageInGb; + + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaxDbNodeStorageInGb { get => this._maxDbNodeStorageInGb; } + + /// Backing field for property. + private int? _maxMemoryInGb; + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaxMemoryInGb { get => this._maxMemoryInGb; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; } + + /// Internal Acessors for AutonomousVMClusterId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.AutonomousVMClusterId { get => this._autonomousVMClusterId; set { {_autonomousVMClusterId = value;} } } + + /// Internal Acessors for AutonomousVirtualMachineId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.AutonomousVirtualMachineId { get => this._autonomousVirtualMachineId; set { {_autonomousVirtualMachineId = value;} } } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.CompartmentId { get => this._compartmentId; set { {_compartmentId = value;} } } + + /// Internal Acessors for CpuCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.CpuCoreCount { get => this._cpuCoreCount; set { {_cpuCoreCount = value;} } } + + /// Internal Acessors for DbNodeId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DbNodeId { get => this._dbNodeId; set { {_dbNodeId = value;} } } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set { {_dbNodeStorageSizeInGb = value;} } } + + /// Internal Acessors for DbServerPatchingDetail + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DbServerPatchingDetail { get => (this._dbServerPatchingDetail = this._dbServerPatchingDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetails()); set { {_dbServerPatchingDetail = value;} } } + + /// Internal Acessors for DbServerPatchingDetailEstimatedPatchDuration + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DbServerPatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).EstimatedPatchDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).EstimatedPatchDuration = value; } + + /// Internal Acessors for DbServerPatchingDetailPatchingStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DbServerPatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).PatchingStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).PatchingStatus = value; } + + /// Internal Acessors for DbServerPatchingDetailTimePatchingEnded + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DbServerPatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingEnded; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingEnded = value; } + + /// Internal Acessors for DbServerPatchingDetailTimePatchingStarted + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DbServerPatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingStarted; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingStarted = value; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for ExadataInfrastructureId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.ExadataInfrastructureId { get => this._exadataInfrastructureId; set { {_exadataInfrastructureId = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.MaxCpuCount { get => this._maxCpuCount; set { {_maxCpuCount = value;} } } + + /// Internal Acessors for MaxDbNodeStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.MaxDbNodeStorageInGb { get => this._maxDbNodeStorageInGb; set { {_maxDbNodeStorageInGb = value;} } } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.MaxMemoryInGb { get => this._maxMemoryInGb; set { {_maxMemoryInGb = value;} } } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.MemorySizeInGb { get => this._memorySizeInGb; set { {_memorySizeInGb = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.Shape { get => this._shape; set { {_shape = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for VMClusterId + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPropertiesInternal.VMClusterId { get => this._vMClusterId; set { {_vMClusterId = value;} } } + + /// Backing field for property. + private string _ocid; + + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _shape; + + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Shape { get => this._shape; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private System.Collections.Generic.List _vMClusterId; + + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List VMClusterId { get => this._vMClusterId; } + + /// Creates an new instance. + public DbServerProperties() + { + + } + } + /// DbServer resource properties + public partial interface IDbServerProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of OCIDs of the Autonomous VM Clusters associated with the Db server.", + SerializedName = @"autonomousVmClusterIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List AutonomousVMClusterId { get; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.", + SerializedName = @"autonomousVirtualMachineIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List AutonomousVirtualMachineId { get; } + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the compartment.", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The number of CPU cores enabled on the Db server.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; } + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Db nodes associated with the Db server.", + SerializedName = @"dbNodeIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List DbNodeId { get; } + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The allocated local node storage in GBs on the Db server.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Estimated Patch Duration", + SerializedName = @"estimatedPatchDuration", + PossibleTypes = new [] { typeof(int) })] + int? DbServerPatchingDetailEstimatedPatchDuration { get; } + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Patching Status", + SerializedName = @"patchingStatus", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Scheduled", "MaintenanceInProgress", "Failed", "Complete")] + string DbServerPatchingDetailPatchingStatus { get; } + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time Patching Ended", + SerializedName = @"timePatchingEnded", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DbServerPatchingDetailTimePatchingEnded { get; } + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Time Patching Started", + SerializedName = @"timePatchingStarted", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DbServerPatchingDetailTimePatchingStarted { get; } + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name for the Db Server.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Exadata infrastructure.", + SerializedName = @"exadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string ExadataInfrastructureId { get; } + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Lifecycle details of dbServer.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"DbServer provisioning state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Available", "Unavailable", "Deleting", "Deleted", "MaintenanceInProgress")] + string LifecycleState { get; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total max dbNode storage in GBs.", + SerializedName = @"maxDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The total memory size in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Db server name.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time that the Db Server was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the VM Clusters associated with the Db server.", + SerializedName = @"vmClusterIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List VMClusterId { get; } + + } + /// DbServer resource properties + internal partial interface IDbServerPropertiesInternal + + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + System.Collections.Generic.List AutonomousVMClusterId { get; set; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + System.Collections.Generic.List AutonomousVirtualMachineId { get; set; } + /// The OCID of the compartment. + string CompartmentId { get; set; } + /// The number of CPU cores enabled on the Db server. + int? CpuCoreCount { get; set; } + /// The OCID of the Db nodes associated with the Db server. + System.Collections.Generic.List DbNodeId { get; set; } + /// The allocated local node storage in GBs on the Db server. + int? DbNodeStorageSizeInGb { get; set; } + /// dbServerPatching details of the Db server. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerPatchingDetails DbServerPatchingDetail { get; set; } + /// Estimated Patch Duration + int? DbServerPatchingDetailEstimatedPatchDuration { get; set; } + /// Patching Status + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Scheduled", "MaintenanceInProgress", "Failed", "Complete")] + string DbServerPatchingDetailPatchingStatus { get; set; } + /// Time Patching Ended + global::System.DateTime? DbServerPatchingDetailTimePatchingEnded { get; set; } + /// Time Patching Started + global::System.DateTime? DbServerPatchingDetailTimePatchingStarted { get; set; } + /// The name for the Db Server. + string DisplayName { get; set; } + /// The OCID of the Exadata infrastructure. + string ExadataInfrastructureId { get; set; } + /// Lifecycle details of dbServer. + string LifecycleDetail { get; set; } + /// DbServer provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Creating", "Available", "Unavailable", "Deleting", "Deleted", "MaintenanceInProgress")] + string LifecycleState { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total max dbNode storage in GBs. + int? MaxDbNodeStorageInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The total memory size in GBs. + int? MemorySizeInGb { get; set; } + /// Db server name. + string Ocid { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + string Shape { get; set; } + /// The date and time that the Db Server was created. + global::System.DateTime? TimeCreated { get; set; } + /// The OCID of the VM Clusters associated with the Db server. + System.Collections.Generic.List VMClusterId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.json.cs new file mode 100644 index 000000000000..20082046e9f7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbServerProperties.json.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbServer resource properties + public partial class DbServerProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbServerProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbServerPatchingDetail = If( json?.PropertyT("dbServerPatchingDetails"), out var __jsonDbServerPatchingDetails) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerPatchingDetails.FromJson(__jsonDbServerPatchingDetails) : _dbServerPatchingDetail;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_compartmentId = If( json?.PropertyT("compartmentId"), out var __jsonCompartmentId) ? (string)__jsonCompartmentId : (string)_compartmentId;} + {_exadataInfrastructureId = If( json?.PropertyT("exadataInfrastructureId"), out var __jsonExadataInfrastructureId) ? (string)__jsonExadataInfrastructureId : (string)_exadataInfrastructureId;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : _cpuCoreCount;} + {_maxMemoryInGb = If( json?.PropertyT("maxMemoryInGbs"), out var __jsonMaxMemoryInGbs) ? (int?)__jsonMaxMemoryInGbs : _maxMemoryInGb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : _dbNodeStorageSizeInGb;} + {_vMClusterId = If( json?.PropertyT("vmClusterIds"), out var __jsonVMClusterIds) ? If( __jsonVMClusterIds as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _vMClusterId;} + {_dbNodeId = If( json?.PropertyT("dbNodeIds"), out var __jsonDbNodeIds) ? If( __jsonDbNodeIds as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _dbNodeId;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_maxCpuCount = If( json?.PropertyT("maxCpuCount"), out var __jsonMaxCpuCount) ? (int?)__jsonMaxCpuCount : _maxCpuCount;} + {_autonomousVMClusterId = If( json?.PropertyT("autonomousVmClusterIds"), out var __jsonAutonomousVMClusterIds) ? If( __jsonAutonomousVMClusterIds as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _autonomousVMClusterId;} + {_autonomousVirtualMachineId = If( json?.PropertyT("autonomousVirtualMachineIds"), out var __jsonAutonomousVirtualMachineIds) ? If( __jsonAutonomousVirtualMachineIds as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _autonomousVirtualMachineId;} + {_maxDbNodeStorageInGb = If( json?.PropertyT("maxDbNodeStorageInGbs"), out var __jsonMaxDbNodeStorageInGbs) ? (int?)__jsonMaxDbNodeStorageInGbs : _maxDbNodeStorageInGb;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : _memorySizeInGb;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)_shape;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : _timeCreated : _timeCreated;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbServerProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._dbServerPatchingDetail ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._dbServerPatchingDetail.ToJson(null,serializationMode) : null, "dbServerPatchingDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._compartmentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._compartmentId.ToString()) : null, "compartmentId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._exadataInfrastructureId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._exadataInfrastructureId.ToString()) : null, "exadataInfrastructureId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxMemoryInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maxMemoryInGb) : null, "maxMemoryInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._vMClusterId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._vMClusterId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("vmClusterIds",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._dbNodeId) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __s in this._dbNodeId ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("dbNodeIds",__r); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxCpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maxCpuCount) : null, "maxCpuCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._autonomousVMClusterId) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __n in this._autonomousVMClusterId ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("autonomousVmClusterIds",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._autonomousVirtualMachineId) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __i in this._autonomousVirtualMachineId ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("autonomousVirtualMachineIds",__h); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxDbNodeStorageInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maxDbNodeStorageInGb) : null, "maxDbNodeStorageInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.PowerShell.cs new file mode 100644 index 000000000000..12febef2b19a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.PowerShell.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DbSystemShape resource definition + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeTypeConverter))] + public partial class DbSystemShape + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbSystemShape(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbSystemShape(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbSystemShape(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbSystemShape(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DbSystemShape resource definition + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeTypeConverter))] + public partial interface IDbSystemShape + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.TypeConverter.cs new file mode 100644 index 000000000000..da06ee81b3e6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbSystemShapeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbSystemShape.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbSystemShape.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbSystemShape.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.cs new file mode 100644 index 000000000000..741eb2f66172 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.cs @@ -0,0 +1,589 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbSystemShape resource definition + public partial class DbSystemShape : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableCoreCount; } + + /// + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata + /// shape and ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableCoreCountPerNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableCoreCountPerNode; } + + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDataStorageInTb; } + + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public double? AvailableDataStoragePerServerInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDataStoragePerServerInTb; } + + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableDbNodePerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDbNodePerNodeInGb; } + + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableDbNodeStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDbNodeStorageInGb; } + + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableMemoryInGb; } + + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? AvailableMemoryPerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableMemoryPerNodeInGb; } + + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? CoreCountIncrement { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).CoreCountIncrement; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaxStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MaxStorageCount; } + + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MaximumNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MaximumNodeCount; } + + /// Internal Acessors for AvailableCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableCoreCount = value; } + + /// Internal Acessors for AvailableCoreCountPerNode + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableCoreCountPerNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableCoreCountPerNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableCoreCountPerNode = value; } + + /// Internal Acessors for AvailableDataStorageInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDataStorageInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDataStorageInTb = value; } + + /// Internal Acessors for AvailableDataStoragePerServerInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableDataStoragePerServerInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDataStoragePerServerInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDataStoragePerServerInTb = value; } + + /// Internal Acessors for AvailableDbNodePerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableDbNodePerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDbNodePerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDbNodePerNodeInGb = value; } + + /// Internal Acessors for AvailableDbNodeStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableDbNodeStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDbNodeStorageInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableDbNodeStorageInGb = value; } + + /// Internal Acessors for AvailableMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableMemoryInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableMemoryInGb = value; } + + /// Internal Acessors for AvailableMemoryPerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.AvailableMemoryPerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableMemoryPerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).AvailableMemoryPerNodeInGb = value; } + + /// Internal Acessors for CoreCountIncrement + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.CoreCountIncrement { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).CoreCountIncrement; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).CoreCountIncrement = value; } + + /// Internal Acessors for MaxStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MaxStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MaxStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MaxStorageCount = value; } + + /// Internal Acessors for MaximumNodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MaximumNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MaximumNodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MaximumNodeCount = value; } + + /// Internal Acessors for MinCoreCountPerNode + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MinCoreCountPerNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinCoreCountPerNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinCoreCountPerNode = value; } + + /// Internal Acessors for MinDataStorageInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MinDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinDataStorageInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinDataStorageInTb = value; } + + /// Internal Acessors for MinDbNodeStoragePerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MinDbNodeStoragePerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinDbNodeStoragePerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinDbNodeStoragePerNodeInGb = value; } + + /// Internal Acessors for MinMemoryPerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MinMemoryPerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinMemoryPerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinMemoryPerNodeInGb = value; } + + /// Internal Acessors for MinStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MinStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinStorageCount = value; } + + /// Internal Acessors for MinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinimumCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinimumCoreCount = value; } + + /// Internal Acessors for MinimumNodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.MinimumNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinimumNodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinimumNodeCount = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeProperties()); set { {_property = value;} } } + + /// Internal Acessors for RuntimeMinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.RuntimeMinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).RuntimeMinimumCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).RuntimeMinimumCoreCount = value; } + + /// Internal Acessors for ShapeFamily + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeInternal.ShapeFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).ShapeFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).ShapeFamily = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MinCoreCountPerNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinCoreCountPerNode; } + + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MinDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinDataStorageInTb; } + + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MinDbNodeStoragePerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinDbNodeStoragePerNodeInGb; } + + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MinMemoryPerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinMemoryPerNodeInGb; } + + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MinStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinStorageCount; } + + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinimumCoreCount; } + + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? MinimumNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).MinimumNodeCount; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? RuntimeMinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).RuntimeMinimumCoreCount; } + + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ShapeFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)Property).ShapeFamily; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public DbSystemShape() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// DbSystemShape resource definition + public partial interface IDbSystemShape : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"availableCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCount { get; } + /// + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata + /// shape and ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes.", + SerializedName = @"availableCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCountPerNode { get; } + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum DATA storage that can be enabled for this shape.", + SerializedName = @"availableDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDataStorageInTb { get; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDataStoragePerServerInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AvailableDataStoragePerServerInTb { get; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDbNodePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodePerNodeInGb { get; } + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum Db Node storage that can be enabled for this shape.", + SerializedName = @"availableDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodeStorageInGb { get; } + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum memory that can be enabled for this shape.", + SerializedName = @"availableMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryInGb { get; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryPerNodeInGb { get; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The discrete number by which the CPU core count for this shape can be increased or decreased.", + SerializedName = @"coreCountIncrement", + PossibleTypes = new [] { typeof(int) })] + int? CoreCountIncrement { get; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"maxStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxStorageCount { get; } + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of database nodes available for this shape.", + SerializedName = @"maximumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MaximumNodeCount { get; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of CPU cores that can be enabled per node for this shape.", + SerializedName = @"minCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? MinCoreCountPerNode { get; } + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum data storage that need be allocated for this shape.", + SerializedName = @"minDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDataStorageInTb { get; } + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum Db Node storage that need be allocated per node for this shape.", + SerializedName = @"minDbNodeStoragePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDbNodeStoragePerNodeInGb { get; } + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum memory that need be allocated per node for this shape.", + SerializedName = @"minMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinMemoryPerNodeInGb { get; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"minStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MinStorageCount { get; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"minimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumCoreCount { get; } + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of database nodes available for this shape.", + SerializedName = @"minimumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumNodeCount { get; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The runtime minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"runtimeMinimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? RuntimeMinimumCoreCount { get; } + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The family of the shape used for the DB system.", + SerializedName = @"shapeFamily", + PossibleTypes = new [] { typeof(string) })] + string ShapeFamily { get; } + + } + /// DbSystemShape resource definition + internal partial interface IDbSystemShapeInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? AvailableCoreCount { get; set; } + /// + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata + /// shape and ExaCC Elastic shapes. + /// + int? AvailableCoreCountPerNode { get; set; } + /// The maximum DATA storage that can be enabled for this shape. + int? AvailableDataStorageInTb { get; set; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + double? AvailableDataStoragePerServerInTb { get; set; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableDbNodePerNodeInGb { get; set; } + /// The maximum Db Node storage that can be enabled for this shape. + int? AvailableDbNodeStorageInGb { get; set; } + /// The maximum memory that can be enabled for this shape. + int? AvailableMemoryInGb { get; set; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableMemoryPerNodeInGb { get; set; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + int? CoreCountIncrement { get; set; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MaxStorageCount { get; set; } + /// The maximum number of database nodes available for this shape. + int? MaximumNodeCount { get; set; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + int? MinCoreCountPerNode { get; set; } + /// The minimum data storage that need be allocated for this shape. + int? MinDataStorageInTb { get; set; } + /// The minimum Db Node storage that need be allocated per node for this shape. + int? MinDbNodeStoragePerNodeInGb { get; set; } + /// The minimum memory that need be allocated per node for this shape. + int? MinMemoryPerNodeInGb { get; set; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MinStorageCount { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? MinimumCoreCount { get; set; } + /// The minimum number of database nodes available for this shape. + int? MinimumNodeCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties Property { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? RuntimeMinimumCoreCount { get; set; } + /// The family of the shape used for the DB system. + string ShapeFamily { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.json.cs new file mode 100644 index 000000000000..cd856cd6a4ac --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShape.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbSystemShape resource definition + public partial class DbSystemShape + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbSystemShape(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbSystemShape(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.PowerShell.cs new file mode 100644 index 000000000000..71db491e5e0e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a DbSystemShape list operation. + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeListResultTypeConverter))] + public partial class DbSystemShapeListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbSystemShapeListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbSystemShapeListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbSystemShapeListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbSystemShapeListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a DbSystemShape list operation. + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeListResultTypeConverter))] + public partial interface IDbSystemShapeListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.TypeConverter.cs new file mode 100644 index 000000000000..8a61382de0bf --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbSystemShapeListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbSystemShapeListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbSystemShapeListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbSystemShapeListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.cs new file mode 100644 index 000000000000..31cf2bdf8a9c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DbSystemShape list operation. + public partial class DbSystemShapeListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The DbSystemShape items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DbSystemShapeListResult() + { + + } + } + /// The response of a DbSystemShape list operation. + public partial interface IDbSystemShapeListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DbSystemShape items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DbSystemShape items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a DbSystemShape list operation. + internal partial interface IDbSystemShapeListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DbSystemShape items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.json.cs new file mode 100644 index 000000000000..255224843c77 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DbSystemShape list operation. + public partial class DbSystemShapeListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbSystemShapeListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShape.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbSystemShapeListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.PowerShell.cs new file mode 100644 index 000000000000..356166df48f1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.PowerShell.cs @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DbSystemShape resource model + [System.ComponentModel.TypeConverter(typeof(DbSystemShapePropertiesTypeConverter))] + public partial class DbSystemShapeProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbSystemShapeProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbSystemShapeProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbSystemShapeProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbSystemShapeProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DbSystemShape resource model + [System.ComponentModel.TypeConverter(typeof(DbSystemShapePropertiesTypeConverter))] + public partial interface IDbSystemShapeProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.TypeConverter.cs new file mode 100644 index 000000000000..712249d32312 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbSystemShapePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbSystemShapeProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbSystemShapeProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbSystemShapeProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.cs new file mode 100644 index 000000000000..146b49c718ce --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.cs @@ -0,0 +1,557 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbSystemShape resource model + public partial class DbSystemShapeProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal + { + + /// Backing field for property. + private int? _availableCoreCount; + + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableCoreCount { get => this._availableCoreCount; } + + /// Backing field for property. + private int? _availableCoreCountPerNode; + + /// + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata + /// shape and ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableCoreCountPerNode { get => this._availableCoreCountPerNode; } + + /// Backing field for property. + private int? _availableDataStorageInTb; + + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableDataStorageInTb { get => this._availableDataStorageInTb; } + + /// Backing field for property. + private double? _availableDataStoragePerServerInTb; + + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public double? AvailableDataStoragePerServerInTb { get => this._availableDataStoragePerServerInTb; } + + /// Backing field for property. + private int? _availableDbNodePerNodeInGb; + + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableDbNodePerNodeInGb { get => this._availableDbNodePerNodeInGb; } + + /// Backing field for property. + private int? _availableDbNodeStorageInGb; + + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableDbNodeStorageInGb { get => this._availableDbNodeStorageInGb; } + + /// Backing field for property. + private int? _availableMemoryInGb; + + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableMemoryInGb { get => this._availableMemoryInGb; } + + /// Backing field for property. + private int? _availableMemoryPerNodeInGb; + + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? AvailableMemoryPerNodeInGb { get => this._availableMemoryPerNodeInGb; } + + /// Backing field for property. + private int? _coreCountIncrement; + + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CoreCountIncrement { get => this._coreCountIncrement; } + + /// Backing field for property. + private int? _maxStorageCount; + + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaxStorageCount { get => this._maxStorageCount; } + + /// Backing field for property. + private int? _maximumNodeCount; + + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MaximumNodeCount { get => this._maximumNodeCount; } + + /// Internal Acessors for AvailableCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableCoreCount { get => this._availableCoreCount; set { {_availableCoreCount = value;} } } + + /// Internal Acessors for AvailableCoreCountPerNode + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableCoreCountPerNode { get => this._availableCoreCountPerNode; set { {_availableCoreCountPerNode = value;} } } + + /// Internal Acessors for AvailableDataStorageInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableDataStorageInTb { get => this._availableDataStorageInTb; set { {_availableDataStorageInTb = value;} } } + + /// Internal Acessors for AvailableDataStoragePerServerInTb + double? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableDataStoragePerServerInTb { get => this._availableDataStoragePerServerInTb; set { {_availableDataStoragePerServerInTb = value;} } } + + /// Internal Acessors for AvailableDbNodePerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableDbNodePerNodeInGb { get => this._availableDbNodePerNodeInGb; set { {_availableDbNodePerNodeInGb = value;} } } + + /// Internal Acessors for AvailableDbNodeStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableDbNodeStorageInGb { get => this._availableDbNodeStorageInGb; set { {_availableDbNodeStorageInGb = value;} } } + + /// Internal Acessors for AvailableMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableMemoryInGb { get => this._availableMemoryInGb; set { {_availableMemoryInGb = value;} } } + + /// Internal Acessors for AvailableMemoryPerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.AvailableMemoryPerNodeInGb { get => this._availableMemoryPerNodeInGb; set { {_availableMemoryPerNodeInGb = value;} } } + + /// Internal Acessors for CoreCountIncrement + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.CoreCountIncrement { get => this._coreCountIncrement; set { {_coreCountIncrement = value;} } } + + /// Internal Acessors for MaxStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MaxStorageCount { get => this._maxStorageCount; set { {_maxStorageCount = value;} } } + + /// Internal Acessors for MaximumNodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MaximumNodeCount { get => this._maximumNodeCount; set { {_maximumNodeCount = value;} } } + + /// Internal Acessors for MinCoreCountPerNode + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MinCoreCountPerNode { get => this._minCoreCountPerNode; set { {_minCoreCountPerNode = value;} } } + + /// Internal Acessors for MinDataStorageInTb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MinDataStorageInTb { get => this._minDataStorageInTb; set { {_minDataStorageInTb = value;} } } + + /// Internal Acessors for MinDbNodeStoragePerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MinDbNodeStoragePerNodeInGb { get => this._minDbNodeStoragePerNodeInGb; set { {_minDbNodeStoragePerNodeInGb = value;} } } + + /// Internal Acessors for MinMemoryPerNodeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MinMemoryPerNodeInGb { get => this._minMemoryPerNodeInGb; set { {_minMemoryPerNodeInGb = value;} } } + + /// Internal Acessors for MinStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MinStorageCount { get => this._minStorageCount; set { {_minStorageCount = value;} } } + + /// Internal Acessors for MinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MinimumCoreCount { get => this._minimumCoreCount; set { {_minimumCoreCount = value;} } } + + /// Internal Acessors for MinimumNodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.MinimumNodeCount { get => this._minimumNodeCount; set { {_minimumNodeCount = value;} } } + + /// Internal Acessors for RuntimeMinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.RuntimeMinimumCoreCount { get => this._runtimeMinimumCoreCount; set { {_runtimeMinimumCoreCount = value;} } } + + /// Internal Acessors for ShapeFamily + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapePropertiesInternal.ShapeFamily { get => this._shapeFamily; set { {_shapeFamily = value;} } } + + /// Backing field for property. + private int? _minCoreCountPerNode; + + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MinCoreCountPerNode { get => this._minCoreCountPerNode; } + + /// Backing field for property. + private int? _minDataStorageInTb; + + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MinDataStorageInTb { get => this._minDataStorageInTb; } + + /// Backing field for property. + private int? _minDbNodeStoragePerNodeInGb; + + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MinDbNodeStoragePerNodeInGb { get => this._minDbNodeStoragePerNodeInGb; } + + /// Backing field for property. + private int? _minMemoryPerNodeInGb; + + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MinMemoryPerNodeInGb { get => this._minMemoryPerNodeInGb; } + + /// Backing field for property. + private int? _minStorageCount; + + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MinStorageCount { get => this._minStorageCount; } + + /// Backing field for property. + private int? _minimumCoreCount; + + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MinimumCoreCount { get => this._minimumCoreCount; } + + /// Backing field for property. + private int? _minimumNodeCount; + + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? MinimumNodeCount { get => this._minimumNodeCount; } + + /// Backing field for property. + private int? _runtimeMinimumCoreCount; + + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? RuntimeMinimumCoreCount { get => this._runtimeMinimumCoreCount; } + + /// Backing field for property. + private string _shapeFamily; + + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ShapeFamily { get => this._shapeFamily; } + + /// Creates an new instance. + public DbSystemShapeProperties() + { + + } + } + /// DbSystemShape resource model + public partial interface IDbSystemShapeProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"availableCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCount { get; } + /// + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata + /// shape and ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes.", + SerializedName = @"availableCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCountPerNode { get; } + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum DATA storage that can be enabled for this shape.", + SerializedName = @"availableDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDataStorageInTb { get; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDataStoragePerServerInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AvailableDataStoragePerServerInTb { get; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDbNodePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodePerNodeInGb { get; } + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum Db Node storage that can be enabled for this shape.", + SerializedName = @"availableDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodeStorageInGb { get; } + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum memory that can be enabled for this shape.", + SerializedName = @"availableMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryInGb { get; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryPerNodeInGb { get; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The discrete number by which the CPU core count for this shape can be increased or decreased.", + SerializedName = @"coreCountIncrement", + PossibleTypes = new [] { typeof(int) })] + int? CoreCountIncrement { get; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"maxStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxStorageCount { get; } + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The maximum number of database nodes available for this shape.", + SerializedName = @"maximumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MaximumNodeCount { get; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of CPU cores that can be enabled per node for this shape.", + SerializedName = @"minCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? MinCoreCountPerNode { get; } + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum data storage that need be allocated for this shape.", + SerializedName = @"minDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDataStorageInTb { get; } + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum Db Node storage that need be allocated per node for this shape.", + SerializedName = @"minDbNodeStoragePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDbNodeStoragePerNodeInGb { get; } + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum memory that need be allocated per node for this shape.", + SerializedName = @"minMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinMemoryPerNodeInGb { get; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"minStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MinStorageCount { get; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"minimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumCoreCount { get; } + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The minimum number of database nodes available for this shape.", + SerializedName = @"minimumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumNodeCount { get; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The runtime minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"runtimeMinimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? RuntimeMinimumCoreCount { get; } + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The family of the shape used for the DB system.", + SerializedName = @"shapeFamily", + PossibleTypes = new [] { typeof(string) })] + string ShapeFamily { get; } + + } + /// DbSystemShape resource model + internal partial interface IDbSystemShapePropertiesInternal + + { + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? AvailableCoreCount { get; set; } + /// + /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata + /// shape and ExaCC Elastic shapes. + /// + int? AvailableCoreCountPerNode { get; set; } + /// The maximum DATA storage that can be enabled for this shape. + int? AvailableDataStorageInTb { get; set; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + double? AvailableDataStoragePerServerInTb { get; set; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableDbNodePerNodeInGb { get; set; } + /// The maximum Db Node storage that can be enabled for this shape. + int? AvailableDbNodeStorageInGb { get; set; } + /// The maximum memory that can be enabled for this shape. + int? AvailableMemoryInGb { get; set; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableMemoryPerNodeInGb { get; set; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + int? CoreCountIncrement { get; set; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MaxStorageCount { get; set; } + /// The maximum number of database nodes available for this shape. + int? MaximumNodeCount { get; set; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + int? MinCoreCountPerNode { get; set; } + /// The minimum data storage that need be allocated for this shape. + int? MinDataStorageInTb { get; set; } + /// The minimum Db Node storage that need be allocated per node for this shape. + int? MinDbNodeStoragePerNodeInGb { get; set; } + /// The minimum memory that need be allocated per node for this shape. + int? MinMemoryPerNodeInGb { get; set; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MinStorageCount { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? MinimumCoreCount { get; set; } + /// The minimum number of database nodes available for this shape. + int? MinimumNodeCount { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? RuntimeMinimumCoreCount { get; set; } + /// The family of the shape used for the DB system. + string ShapeFamily { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.json.cs new file mode 100644 index 000000000000..e01ea1c2b7f7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DbSystemShapeProperties.json.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DbSystemShape resource model + public partial class DbSystemShapeProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DbSystemShapeProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_shapeFamily = If( json?.PropertyT("shapeFamily"), out var __jsonShapeFamily) ? (string)__jsonShapeFamily : (string)_shapeFamily;} + {_availableCoreCount = If( json?.PropertyT("availableCoreCount"), out var __jsonAvailableCoreCount) ? (int?)__jsonAvailableCoreCount : _availableCoreCount;} + {_minimumCoreCount = If( json?.PropertyT("minimumCoreCount"), out var __jsonMinimumCoreCount) ? (int?)__jsonMinimumCoreCount : _minimumCoreCount;} + {_runtimeMinimumCoreCount = If( json?.PropertyT("runtimeMinimumCoreCount"), out var __jsonRuntimeMinimumCoreCount) ? (int?)__jsonRuntimeMinimumCoreCount : _runtimeMinimumCoreCount;} + {_coreCountIncrement = If( json?.PropertyT("coreCountIncrement"), out var __jsonCoreCountIncrement) ? (int?)__jsonCoreCountIncrement : _coreCountIncrement;} + {_minStorageCount = If( json?.PropertyT("minStorageCount"), out var __jsonMinStorageCount) ? (int?)__jsonMinStorageCount : _minStorageCount;} + {_maxStorageCount = If( json?.PropertyT("maxStorageCount"), out var __jsonMaxStorageCount) ? (int?)__jsonMaxStorageCount : _maxStorageCount;} + {_availableDataStoragePerServerInTb = If( json?.PropertyT("availableDataStoragePerServerInTbs"), out var __jsonAvailableDataStoragePerServerInTbs) ? (double?)__jsonAvailableDataStoragePerServerInTbs : _availableDataStoragePerServerInTb;} + {_availableMemoryPerNodeInGb = If( json?.PropertyT("availableMemoryPerNodeInGbs"), out var __jsonAvailableMemoryPerNodeInGbs) ? (int?)__jsonAvailableMemoryPerNodeInGbs : _availableMemoryPerNodeInGb;} + {_availableDbNodePerNodeInGb = If( json?.PropertyT("availableDbNodePerNodeInGbs"), out var __jsonAvailableDbNodePerNodeInGbs) ? (int?)__jsonAvailableDbNodePerNodeInGbs : _availableDbNodePerNodeInGb;} + {_minCoreCountPerNode = If( json?.PropertyT("minCoreCountPerNode"), out var __jsonMinCoreCountPerNode) ? (int?)__jsonMinCoreCountPerNode : _minCoreCountPerNode;} + {_availableMemoryInGb = If( json?.PropertyT("availableMemoryInGbs"), out var __jsonAvailableMemoryInGbs) ? (int?)__jsonAvailableMemoryInGbs : _availableMemoryInGb;} + {_minMemoryPerNodeInGb = If( json?.PropertyT("minMemoryPerNodeInGbs"), out var __jsonMinMemoryPerNodeInGbs) ? (int?)__jsonMinMemoryPerNodeInGbs : _minMemoryPerNodeInGb;} + {_availableDbNodeStorageInGb = If( json?.PropertyT("availableDbNodeStorageInGbs"), out var __jsonAvailableDbNodeStorageInGbs) ? (int?)__jsonAvailableDbNodeStorageInGbs : _availableDbNodeStorageInGb;} + {_minDbNodeStoragePerNodeInGb = If( json?.PropertyT("minDbNodeStoragePerNodeInGbs"), out var __jsonMinDbNodeStoragePerNodeInGbs) ? (int?)__jsonMinDbNodeStoragePerNodeInGbs : _minDbNodeStoragePerNodeInGb;} + {_availableDataStorageInTb = If( json?.PropertyT("availableDataStorageInTbs"), out var __jsonAvailableDataStorageInTbs) ? (int?)__jsonAvailableDataStorageInTbs : _availableDataStorageInTb;} + {_minDataStorageInTb = If( json?.PropertyT("minDataStorageInTbs"), out var __jsonMinDataStorageInTbs) ? (int?)__jsonMinDataStorageInTbs : _minDataStorageInTb;} + {_minimumNodeCount = If( json?.PropertyT("minimumNodeCount"), out var __jsonMinimumNodeCount) ? (int?)__jsonMinimumNodeCount : _minimumNodeCount;} + {_maximumNodeCount = If( json?.PropertyT("maximumNodeCount"), out var __jsonMaximumNodeCount) ? (int?)__jsonMaximumNodeCount : _maximumNodeCount;} + {_availableCoreCountPerNode = If( json?.PropertyT("availableCoreCountPerNode"), out var __jsonAvailableCoreCountPerNode) ? (int?)__jsonAvailableCoreCountPerNode : _availableCoreCountPerNode;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DbSystemShapeProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._shapeFamily)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._shapeFamily.ToString()) : null, "shapeFamily" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableCoreCount) : null, "availableCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._minimumCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._minimumCoreCount) : null, "minimumCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._runtimeMinimumCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._runtimeMinimumCoreCount) : null, "runtimeMinimumCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._coreCountIncrement ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._coreCountIncrement) : null, "coreCountIncrement" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._minStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._minStorageCount) : null, "minStorageCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maxStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maxStorageCount) : null, "maxStorageCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableDataStoragePerServerInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((double)this._availableDataStoragePerServerInTb) : null, "availableDataStoragePerServerInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableMemoryPerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableMemoryPerNodeInGb) : null, "availableMemoryPerNodeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableDbNodePerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableDbNodePerNodeInGb) : null, "availableDbNodePerNodeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._minCoreCountPerNode ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._minCoreCountPerNode) : null, "minCoreCountPerNode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableMemoryInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableMemoryInGb) : null, "availableMemoryInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._minMemoryPerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._minMemoryPerNodeInGb) : null, "minMemoryPerNodeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableDbNodeStorageInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableDbNodeStorageInGb) : null, "availableDbNodeStorageInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._minDbNodeStoragePerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._minDbNodeStoragePerNodeInGb) : null, "minDbNodeStoragePerNodeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableDataStorageInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableDataStorageInTb) : null, "availableDataStorageInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._minDataStorageInTb ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._minDataStorageInTb) : null, "minDataStorageInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._minimumNodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._minimumNodeCount) : null, "minimumNodeCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._maximumNodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._maximumNodeCount) : null, "maximumNodeCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._availableCoreCountPerNode ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._availableCoreCountPerNode) : null, "availableCoreCountPerNode" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.PowerShell.cs new file mode 100644 index 000000000000..6137b92b12ec --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.PowerShell.cs @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DnsPrivateView resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewTypeConverter))] + public partial class DnsPrivateView + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateView(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateView(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateView(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeUpdated = (global::System.DateTime?) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateView(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeUpdated = (global::System.DateTime?) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DnsPrivateView resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewTypeConverter))] + public partial interface IDnsPrivateView + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.TypeConverter.cs new file mode 100644 index 000000000000..dbf49fde4443 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateViewTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateView.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateView.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateView.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.cs new file mode 100644 index 000000000000..eb04085a5363 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DnsPrivateView resource definition + public partial class DnsPrivateView : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).DisplayName; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).IsProtected; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).LifecycleState; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).DisplayName = value; } + + /// Internal Acessors for IsProtected + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.IsProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).IsProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).IsProtected = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Self + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.Self { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).Self; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).Self = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for TimeUpdated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewInternal.TimeUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).TimeUpdated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).TimeUpdated = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Self { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).Self; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).TimeCreated; } + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)Property).TimeUpdated; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public DnsPrivateView() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// DnsPrivateView resource definition + public partial interface IDnsPrivateView : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The display name of the view resource", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool? IsProtected { get; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; } + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the view", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"views timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"views timeCreated", + SerializedName = @"timeUpdated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeUpdated { get; } + + } + /// DnsPrivateView resource definition + internal partial interface IDnsPrivateViewInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// The display name of the view resource + string DisplayName { get; set; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool? IsProtected { get; set; } + /// Views lifecycleState + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; set; } + /// The OCID of the view + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties Property { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// views timeCreated + global::System.DateTime? TimeCreated { get; set; } + /// views timeCreated + global::System.DateTime? TimeUpdated { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.json.cs new file mode 100644 index 000000000000..13b67f03e4c3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateView.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DnsPrivateView resource definition + public partial class DnsPrivateView + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateView(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DnsPrivateView(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.PowerShell.cs new file mode 100644 index 000000000000..d6eb8f8e745a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a DnsPrivateView list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewListResultTypeConverter))] + public partial class DnsPrivateViewListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateViewListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateViewListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateViewListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateViewListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a DnsPrivateView list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewListResultTypeConverter))] + public partial interface IDnsPrivateViewListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.TypeConverter.cs new file mode 100644 index 000000000000..89d74b4f924c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateViewListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateViewListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateViewListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateViewListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.cs new file mode 100644 index 000000000000..8ce2c51d202e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DnsPrivateView list operation. + public partial class DnsPrivateViewListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The DnsPrivateView items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DnsPrivateViewListResult() + { + + } + } + /// The response of a DnsPrivateView list operation. + public partial interface IDnsPrivateViewListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DnsPrivateView items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DnsPrivateView items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a DnsPrivateView list operation. + internal partial interface IDnsPrivateViewListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DnsPrivateView items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.json.cs new file mode 100644 index 000000000000..0fc8ad5cfaa2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DnsPrivateView list operation. + public partial class DnsPrivateViewListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateViewListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateView.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DnsPrivateViewListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.PowerShell.cs new file mode 100644 index 000000000000..e50ba72dc937 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Views resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewPropertiesTypeConverter))] + public partial class DnsPrivateViewProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateViewProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateViewProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateViewProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeUpdated = (global::System.DateTime?) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateViewProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeUpdated = (global::System.DateTime?) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Views resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewPropertiesTypeConverter))] + public partial interface IDnsPrivateViewProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.TypeConverter.cs new file mode 100644 index 000000000000..af8760bd4de7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateViewPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateViewProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateViewProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateViewProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.cs new file mode 100644 index 000000000000..7c52550d8263 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Views resource model + public partial class DnsPrivateViewProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal + { + + /// Backing field for property. + private string _displayName; + + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Backing field for property. + private bool? _isProtected; + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsProtected { get => this._isProtected; } + + /// Backing field for property. + private string _lifecycleState; + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for IsProtected + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.IsProtected { get => this._isProtected; set { {_isProtected = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Self + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.Self { get => this._self; set { {_self = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for TimeUpdated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewPropertiesInternal.TimeUpdated { get => this._timeUpdated; set { {_timeUpdated = value;} } } + + /// Backing field for property. + private string _ocid; + + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _self; + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Self { get => this._self; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private global::System.DateTime? _timeUpdated; + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeUpdated { get => this._timeUpdated; } + + /// Creates an new instance. + public DnsPrivateViewProperties() + { + + } + } + /// Views resource model + public partial interface IDnsPrivateViewProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The display name of the view resource", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool? IsProtected { get; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; } + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the view", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"views timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"views timeCreated", + SerializedName = @"timeUpdated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeUpdated { get; } + + } + /// Views resource model + internal partial interface IDnsPrivateViewPropertiesInternal + + { + /// The display name of the view resource + string DisplayName { get; set; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool? IsProtected { get; set; } + /// Views lifecycleState + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; set; } + /// The OCID of the view + string Ocid { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// views timeCreated + global::System.DateTime? TimeCreated { get; set; } + /// views timeCreated + global::System.DateTime? TimeUpdated { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.json.cs new file mode 100644 index 000000000000..f5de957df041 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateViewProperties.json.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Views resource model + public partial class DnsPrivateViewProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateViewProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_isProtected = If( json?.PropertyT("isProtected"), out var __jsonIsProtected) ? (bool?)__jsonIsProtected : _isProtected;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_self = If( json?.PropertyT("self"), out var __jsonSelf) ? (string)__jsonSelf : (string)_self;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : _timeCreated : _timeCreated;} + {_timeUpdated = If( json?.PropertyT("timeUpdated"), out var __jsonTimeUpdated) ? global::System.DateTime.TryParse((string)__jsonTimeUpdated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeUpdatedValue) ? __jsonTimeUpdatedValue : _timeUpdated : _timeUpdated;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DnsPrivateViewProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isProtected ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isProtected) : null, "isProtected" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._self)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._self.ToString()) : null, "self" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeUpdated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeUpdated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeUpdated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.PowerShell.cs new file mode 100644 index 000000000000..8ab3232e2f79 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.PowerShell.cs @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// DnsPrivateZone resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneTypeConverter))] + public partial class DnsPrivateZone + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateZone(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateZone(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateZone(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZonePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ZoneType = (string) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ZoneType, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Serial = (int?) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateZone(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZonePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ZoneType = (string) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ZoneType, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Serial = (int?) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// DnsPrivateZone resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneTypeConverter))] + public partial interface IDnsPrivateZone + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.TypeConverter.cs new file mode 100644 index 000000000000..a6afe5b207b4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateZoneTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateZone.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateZone.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateZone.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.cs new file mode 100644 index 000000000000..0d7d7f040a54 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.cs @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DnsPrivateZone resource definition + public partial class DnsPrivateZone : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public bool? IsProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).IsProtected; } + + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).LifecycleState; } + + /// Internal Acessors for IsProtected + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.IsProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).IsProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).IsProtected = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Self + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.Self { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Self; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Self = value; } + + /// Internal Acessors for Serial + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.Serial { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Serial; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Serial = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Version = value; } + + /// Internal Acessors for ViewId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.ViewId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ViewId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ViewId = value; } + + /// Internal Acessors for ZoneType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneInternal.ZoneType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ZoneType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ZoneType = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Self { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Self; } + + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? Serial { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Serial; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).TimeCreated; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).Version; } + + /// + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly + /// resolvable and not part of a private view. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ViewId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ViewId; } + + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ZoneType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)Property).ZoneType; } + + /// Creates an new instance. + public DnsPrivateZone() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// DnsPrivateZone resource definition + public partial interface IDnsPrivateZone : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool? IsProtected { get; } + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Zones lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Creating", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; } + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Zone", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; } + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current serial of the zone. As seen in the zone's SOA record.", + SerializedName = @"serial", + PossibleTypes = new [] { typeof(int) })] + int? Serial { get; } + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Zones timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + /// + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly + /// resolvable and not part of a private view. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view.", + SerializedName = @"viewId", + PossibleTypes = new [] { typeof(string) })] + string ViewId { get; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones.", + SerializedName = @"zoneType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Secondary")] + string ZoneType { get; } + + } + /// DnsPrivateZone resource definition + internal partial interface IDnsPrivateZoneInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool? IsProtected { get; set; } + /// Zones lifecycleState + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Creating", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; set; } + /// The OCID of the Zone + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties Property { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// The current serial of the zone. As seen in the zone's SOA record. + int? Serial { get; set; } + /// Zones timeCreated + global::System.DateTime? TimeCreated { get; set; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + string Version { get; set; } + /// + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly + /// resolvable and not part of a private view. + /// + string ViewId { get; set; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Secondary")] + string ZoneType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.json.cs new file mode 100644 index 000000000000..1b528ecf86be --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZone.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// DnsPrivateZone resource definition + public partial class DnsPrivateZone + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateZone(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DnsPrivateZone(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.PowerShell.cs new file mode 100644 index 000000000000..ef8a5c8f8e88 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a DnsPrivateZone list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneListResultTypeConverter))] + public partial class DnsPrivateZoneListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateZoneListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateZoneListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateZoneListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateZoneListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a DnsPrivateZone list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneListResultTypeConverter))] + public partial interface IDnsPrivateZoneListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.TypeConverter.cs new file mode 100644 index 000000000000..78bb90710228 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateZoneListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateZoneListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateZoneListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateZoneListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.cs new file mode 100644 index 000000000000..3b0394bc53d0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DnsPrivateZone list operation. + public partial class DnsPrivateZoneListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The DnsPrivateZone items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DnsPrivateZoneListResult() + { + + } + } + /// The response of a DnsPrivateZone list operation. + public partial interface IDnsPrivateZoneListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DnsPrivateZone items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DnsPrivateZone items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a DnsPrivateZone list operation. + internal partial interface IDnsPrivateZoneListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DnsPrivateZone items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.json.cs new file mode 100644 index 000000000000..7a843806f407 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a DnsPrivateZone list operation. + public partial class DnsPrivateZoneListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateZoneListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZone.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DnsPrivateZoneListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.PowerShell.cs new file mode 100644 index 000000000000..e0b40001a5dd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.PowerShell.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Zones resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZonePropertiesTypeConverter))] + public partial class DnsPrivateZoneProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateZoneProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateZoneProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateZoneProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Serial = (int?) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ZoneType = (string) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ZoneType, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateZoneProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).IsProtected = (bool?) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Serial = (int?) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ZoneType = (string) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ZoneType, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Zones resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZonePropertiesTypeConverter))] + public partial interface IDnsPrivateZoneProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.TypeConverter.cs new file mode 100644 index 000000000000..8fd52eef87c8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateZonePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateZoneProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateZoneProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateZoneProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.cs new file mode 100644 index 000000000000..7231760d1ecf --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Zones resource model + public partial class DnsPrivateZoneProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal + { + + /// Backing field for property. + private bool? _isProtected; + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsProtected { get => this._isProtected; } + + /// Backing field for property. + private string _lifecycleState; + + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Internal Acessors for IsProtected + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.IsProtected { get => this._isProtected; set { {_isProtected = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Self + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.Self { get => this._self; set { {_self = value;} } } + + /// Internal Acessors for Serial + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.Serial { get => this._serial; set { {_serial = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.Version { get => this._version; set { {_version = value;} } } + + /// Internal Acessors for ViewId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.ViewId { get => this._viewId; set { {_viewId = value;} } } + + /// Internal Acessors for ZoneType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZonePropertiesInternal.ZoneType { get => this._zoneType; set { {_zoneType = value;} } } + + /// Backing field for property. + private string _ocid; + + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _self; + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Self { get => this._self; } + + /// Backing field for property. + private int? _serial; + + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? Serial { get => this._serial; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private string _version; + + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Version { get => this._version; } + + /// Backing field for property. + private string _viewId; + + /// + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly + /// resolvable and not part of a private view. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ViewId { get => this._viewId; } + + /// Backing field for property. + private string _zoneType; + + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ZoneType { get => this._zoneType; } + + /// Creates an new instance. + public DnsPrivateZoneProperties() + { + + } + } + /// Zones resource model + public partial interface IDnsPrivateZoneProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool? IsProtected { get; } + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Zones lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Creating", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; } + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the Zone", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; } + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current serial of the zone. As seen in the zone's SOA record.", + SerializedName = @"serial", + PossibleTypes = new [] { typeof(int) })] + int? Serial { get; } + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Zones timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + /// + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly + /// resolvable and not part of a private view. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view.", + SerializedName = @"viewId", + PossibleTypes = new [] { typeof(string) })] + string ViewId { get; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones.", + SerializedName = @"zoneType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Secondary")] + string ZoneType { get; } + + } + /// Zones resource model + internal partial interface IDnsPrivateZonePropertiesInternal + + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool? IsProtected { get; set; } + /// Zones lifecycleState + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Active", "Creating", "Deleted", "Deleting", "Updating")] + string LifecycleState { get; set; } + /// The OCID of the Zone + string Ocid { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// The current serial of the zone. As seen in the zone's SOA record. + int? Serial { get; set; } + /// Zones timeCreated + global::System.DateTime? TimeCreated { get; set; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + string Version { get; set; } + /// + /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly + /// resolvable and not part of a private view. + /// + string ViewId { get; set; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Secondary")] + string ZoneType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.json.cs new file mode 100644 index 000000000000..dfdb8d67e00c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/DnsPrivateZoneProperties.json.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Zones resource model + public partial class DnsPrivateZoneProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateZoneProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_isProtected = If( json?.PropertyT("isProtected"), out var __jsonIsProtected) ? (bool?)__jsonIsProtected : _isProtected;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_self = If( json?.PropertyT("self"), out var __jsonSelf) ? (string)__jsonSelf : (string)_self;} + {_serial = If( json?.PropertyT("serial"), out var __jsonSerial) ? (int?)__jsonSerial : _serial;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + {_viewId = If( json?.PropertyT("viewId"), out var __jsonViewId) ? (string)__jsonViewId : (string)_viewId;} + {_zoneType = If( json?.PropertyT("zoneType"), out var __jsonZoneType) ? (string)__jsonZoneType : (string)_zoneType;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : _timeCreated : _timeCreated;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new DnsPrivateZoneProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isProtected ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isProtected) : null, "isProtected" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._self)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._self.ToString()) : null, "self" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._serial ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._serial) : null, "serial" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._viewId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._viewId.ToString()) : null, "viewId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._zoneType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._zoneType.ToString()) : null, "zoneType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs new file mode 100644 index 000000000000..61747f6070ca --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial class ErrorAdditionalInfo + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial interface IErrorAdditionalInfo + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs new file mode 100644 index 000000000000..ebe78c7e7271 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..ce459e5e1e96 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..d1692ab119a2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorAdditionalInfo.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Any.FromJson(__jsonInfo) : _info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..b67c3171590e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorDetail(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..54f27d75aacf --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.cs new file mode 100644 index 000000000000..44234fc96d51 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private System.Collections.Generic.List _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.json.cs new file mode 100644 index 000000000000..a024d23feaa7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorDetail.json.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)_target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetail.FromJson(__u) )) ))() : null : _detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : _additionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..feb222a3b109 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.PowerShell.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Detail = (System.Collections.Generic.List) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).AdditionalInfo = (System.Collections.Generic.List) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..4b1bb8e9cdd4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.cs new file mode 100644 index 000000000000..cbb3b49aca53 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public System.Collections.Generic.List Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorAdditionalInfo) })] + System.Collections.Generic.List AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail) })] + System.Collections.Generic.List Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + System.Collections.Generic.List AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + System.Collections.Generic.List Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.json.cs new file mode 100644 index 000000000000..fbdd58896820 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ErrorResponse.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorDetail.FromJson(__jsonError) : _error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.PowerShell.cs new file mode 100644 index 000000000000..1e8a40bcc603 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.PowerShell.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + [System.ComponentModel.TypeConverter(typeof(EstimatedPatchingTimeTypeConverter))] + public partial class EstimatedPatchingTime + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EstimatedPatchingTime(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EstimatedPatchingTime(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EstimatedPatchingTime(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime = (int?) content.GetValueForProperty("TotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EstimatedPatchingTime(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime = (int?) content.GetValueForProperty("TotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + [System.ComponentModel.TypeConverter(typeof(EstimatedPatchingTimeTypeConverter))] + public partial interface IEstimatedPatchingTime + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.TypeConverter.cs new file mode 100644 index 000000000000..c445a0bbf288 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EstimatedPatchingTimeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EstimatedPatchingTime.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EstimatedPatchingTime.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EstimatedPatchingTime.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.cs new file mode 100644 index 000000000000..d34eab2569ee --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + public partial class EstimatedPatchingTime : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal + { + + /// Backing field for property. + private int? _estimatedDbServerPatchingTime; + + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? EstimatedDbServerPatchingTime { get => this._estimatedDbServerPatchingTime; } + + /// Backing field for property. + private int? _estimatedNetworkSwitchesPatchingTime; + + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? EstimatedNetworkSwitchesPatchingTime { get => this._estimatedNetworkSwitchesPatchingTime; } + + /// Backing field for property. + private int? _estimatedStorageServerPatchingTime; + + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? EstimatedStorageServerPatchingTime { get => this._estimatedStorageServerPatchingTime; } + + /// Internal Acessors for EstimatedDbServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal.EstimatedDbServerPatchingTime { get => this._estimatedDbServerPatchingTime; set { {_estimatedDbServerPatchingTime = value;} } } + + /// Internal Acessors for EstimatedNetworkSwitchesPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal.EstimatedNetworkSwitchesPatchingTime { get => this._estimatedNetworkSwitchesPatchingTime; set { {_estimatedNetworkSwitchesPatchingTime = value;} } } + + /// Internal Acessors for EstimatedStorageServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal.EstimatedStorageServerPatchingTime { get => this._estimatedStorageServerPatchingTime; set { {_estimatedStorageServerPatchingTime = value;} } } + + /// Internal Acessors for TotalEstimatedPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTimeInternal.TotalEstimatedPatchingTime { get => this._totalEstimatedPatchingTime; set { {_totalEstimatedPatchingTime = value;} } } + + /// Backing field for property. + private int? _totalEstimatedPatchingTime; + + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? TotalEstimatedPatchingTime { get => this._totalEstimatedPatchingTime; } + + /// Creates an new instance. + public EstimatedPatchingTime() + { + + } + } + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + public partial interface IEstimatedPatchingTime : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for database server patching.", + SerializedName = @"estimatedDbServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedDbServerPatchingTime { get; } + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for network switch patching.", + SerializedName = @"estimatedNetworkSwitchesPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedNetworkSwitchesPatchingTime { get; } + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated time required in minutes for storage server patching.", + SerializedName = @"estimatedStorageServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedStorageServerPatchingTime { get; } + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The estimated total time required in minutes for all patching operations.", + SerializedName = @"totalEstimatedPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? TotalEstimatedPatchingTime { get; } + + } + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + internal partial interface IEstimatedPatchingTimeInternal + + { + /// The estimated time required in minutes for database server patching. + int? EstimatedDbServerPatchingTime { get; set; } + /// The estimated time required in minutes for network switch patching. + int? EstimatedNetworkSwitchesPatchingTime { get; set; } + /// The estimated time required in minutes for storage server patching. + int? EstimatedStorageServerPatchingTime { get; set; } + /// The estimated total time required in minutes for all patching operations. + int? TotalEstimatedPatchingTime { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.json.cs new file mode 100644 index 000000000000..7e1b9dc93723 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/EstimatedPatchingTime.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + public partial class EstimatedPatchingTime + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal EstimatedPatchingTime(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_estimatedDbServerPatchingTime = If( json?.PropertyT("estimatedDbServerPatchingTime"), out var __jsonEstimatedDbServerPatchingTime) ? (int?)__jsonEstimatedDbServerPatchingTime : _estimatedDbServerPatchingTime;} + {_estimatedNetworkSwitchesPatchingTime = If( json?.PropertyT("estimatedNetworkSwitchesPatchingTime"), out var __jsonEstimatedNetworkSwitchesPatchingTime) ? (int?)__jsonEstimatedNetworkSwitchesPatchingTime : _estimatedNetworkSwitchesPatchingTime;} + {_estimatedStorageServerPatchingTime = If( json?.PropertyT("estimatedStorageServerPatchingTime"), out var __jsonEstimatedStorageServerPatchingTime) ? (int?)__jsonEstimatedStorageServerPatchingTime : _estimatedStorageServerPatchingTime;} + {_totalEstimatedPatchingTime = If( json?.PropertyT("totalEstimatedPatchingTime"), out var __jsonTotalEstimatedPatchingTime) ? (int?)__jsonTotalEstimatedPatchingTime : _totalEstimatedPatchingTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IEstimatedPatchingTime FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new EstimatedPatchingTime(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._estimatedDbServerPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._estimatedDbServerPatchingTime) : null, "estimatedDbServerPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._estimatedNetworkSwitchesPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._estimatedNetworkSwitchesPatchingTime) : null, "estimatedNetworkSwitchesPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._estimatedStorageServerPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._estimatedStorageServerPatchingTime) : null, "estimatedStorageServerPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._totalEstimatedPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._totalEstimatedPatchingTime) : null, "totalEstimatedPatchingTime" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.PowerShell.cs new file mode 100644 index 000000000000..553fd0a41e67 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// ExadataIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(ExadataIormConfigTypeConverter))] + public partial class ExadataIormConfig + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadataIormConfig(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadataIormConfig(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadataIormConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).DbPlan = (System.Collections.Generic.List) content.GetValueForProperty("DbPlan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).DbPlan, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Objective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).Objective = (string) content.GetValueForProperty("Objective",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).Objective, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadataIormConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).DbPlan = (System.Collections.Generic.List) content.GetValueForProperty("DbPlan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).DbPlan, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("Objective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).Objective = (string) content.GetValueForProperty("Objective",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal)this).Objective, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// ExadataIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(ExadataIormConfigTypeConverter))] + public partial interface IExadataIormConfig + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.TypeConverter.cs new file mode 100644 index 000000000000..aee6970c6644 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadataIormConfigTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadataIormConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadataIormConfig.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadataIormConfig.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.cs new file mode 100644 index 000000000000..47d198a49674 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// ExadataIormConfig for cloud vm cluster + public partial class ExadataIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfigInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _dbPlan; + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List DbPlan { get => this._dbPlan; set => this._dbPlan = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; set => this._lifecycleDetail = value; } + + /// Backing field for property. + private string _lifecycleState; + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Backing field for property. + private string _objective; + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Objective { get => this._objective; set => this._objective = value; } + + /// Creates an new instance. + public ExadataIormConfig() + { + + } + } + /// ExadataIormConfig for cloud vm cluster + public partial interface IExadataIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig) })] + System.Collections.Generic.List DbPlan { get; set; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("BootStrapping", "Enabled", "Disabled", "Updating", "Failed")] + string LifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LowLatency", "HighThroughput", "Balanced", "Auto", "Basic")] + string Objective { get; set; } + + } + /// ExadataIormConfig for cloud vm cluster + internal partial interface IExadataIormConfigInternal + + { + /// An array of IORM settings for all the database in the Exadata DB system. + System.Collections.Generic.List DbPlan { get; set; } + /// Additional information about the current lifecycleState. + string LifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("BootStrapping", "Enabled", "Disabled", "Updating", "Failed")] + string LifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LowLatency", "HighThroughput", "Balanced", "Auto", "Basic")] + string Objective { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.json.cs new file mode 100644 index 000000000000..6f949b860429 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ExadataIormConfig.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// ExadataIormConfig for cloud vm cluster + public partial class ExadataIormConfig + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ExadataIormConfig(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbPlan = If( json?.PropertyT("dbPlans"), out var __jsonDbPlans) ? If( __jsonDbPlans as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbIormConfig) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbIormConfig.FromJson(__u) )) ))() : null : _dbPlan;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_objective = If( json?.PropertyT("objective"), out var __jsonObjective) ? (string)__jsonObjective : (string)_objective;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IExadataIormConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ExadataIormConfig(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._dbPlan) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._dbPlan ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("dbPlans",__w); + } + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._objective)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._objective.ToString()) : null, "objective" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.PowerShell.cs new file mode 100644 index 000000000000..68b2a96a3b4c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.PowerShell.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Autonomous Database Generate Wallet resource model. + [System.ComponentModel.TypeConverter(typeof(GenerateAutonomousDatabaseWalletDetailsTypeConverter))] + public partial class GenerateAutonomousDatabaseWalletDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GenerateAutonomousDatabaseWalletDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GenerateAutonomousDatabaseWalletDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GenerateAutonomousDatabaseWalletDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GenerateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType = (string) content.GetValueForProperty("GenerateType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType, global::System.Convert.ToString); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password, (object ss) => (System.Security.SecureString)ss); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GenerateAutonomousDatabaseWalletDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GenerateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType = (string) content.GetValueForProperty("GenerateType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType, global::System.Convert.ToString); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password, (object ss) => (System.Security.SecureString)ss); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Autonomous Database Generate Wallet resource model. + [System.ComponentModel.TypeConverter(typeof(GenerateAutonomousDatabaseWalletDetailsTypeConverter))] + public partial interface IGenerateAutonomousDatabaseWalletDetails + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.TypeConverter.cs new file mode 100644 index 000000000000..39f1683f5823 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GenerateAutonomousDatabaseWalletDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GenerateAutonomousDatabaseWalletDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GenerateAutonomousDatabaseWalletDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GenerateAutonomousDatabaseWalletDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.cs new file mode 100644 index 000000000000..5b24dca683ed --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database Generate Wallet resource model. + public partial class GenerateAutonomousDatabaseWalletDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetailsInternal + { + + /// Backing field for property. + private string _generateType; + + /// The type of wallet to generate. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string GenerateType { get => this._generateType; set => this._generateType = value; } + + /// Backing field for property. + private bool? _isRegional; + + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsRegional { get => this._isRegional; set => this._isRegional = value; } + + /// Backing field for property. + private System.Security.SecureString _password; + + /// The password to encrypt the keys inside the wallet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Security.SecureString Password { get => this._password; set => this._password = value; } + + /// Creates an new instance. + public GenerateAutonomousDatabaseWalletDetails() + { + + } + } + /// Autonomous Database Generate Wallet resource model. + public partial interface IGenerateAutonomousDatabaseWalletDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The type of wallet to generate. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of wallet to generate.", + SerializedName = @"generateType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Single", "All")] + string GenerateType { get; set; } + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only.", + SerializedName = @"isRegional", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRegional { get; set; } + /// The password to encrypt the keys inside the wallet + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The password to encrypt the keys inside the wallet", + SerializedName = @"password", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString Password { get; set; } + + } + /// Autonomous Database Generate Wallet resource model. + internal partial interface IGenerateAutonomousDatabaseWalletDetailsInternal + + { + /// The type of wallet to generate. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Single", "All")] + string GenerateType { get; set; } + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + bool? IsRegional { get; set; } + /// The password to encrypt the keys inside the wallet + System.Security.SecureString Password { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.json.cs new file mode 100644 index 000000000000..c63600610b7d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GenerateAutonomousDatabaseWalletDetails.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Autonomous Database Generate Wallet resource model. + public partial class GenerateAutonomousDatabaseWalletDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new GenerateAutonomousDatabaseWalletDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal GenerateAutonomousDatabaseWalletDetails(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_generateType = If( json?.PropertyT("generateType"), out var __jsonGenerateType) ? (string)__jsonGenerateType : (string)_generateType;} + {_isRegional = If( json?.PropertyT("isRegional"), out var __jsonIsRegional) ? (bool?)__jsonIsRegional : _isRegional;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? new System.Net.NetworkCredential("",(string)__jsonPassword).SecurePassword : _password;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._generateType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._generateType.ToString()) : null, "generateType" ,container.Add ); + AddIf( null != this._isRegional ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isRegional) : null, "isRegional" ,container.Add ); + AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._password))) : null, "password" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.PowerShell.cs new file mode 100644 index 000000000000..5363b2c76ae2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.PowerShell.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// GiVersion resource definition + [System.ComponentModel.TypeConverter(typeof(GiVersionTypeConverter))] + public partial class GiVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// GiVersion resource definition + [System.ComponentModel.TypeConverter(typeof(GiVersionTypeConverter))] + public partial interface IGiVersion + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.TypeConverter.cs new file mode 100644 index 000000000000..6142f6f23ca6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.cs new file mode 100644 index 000000000000..61a1f425d2f4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// GiVersion resource definition + public partial class GiVersion : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionProperties()); set { {_property = value;} } } + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionInternal.Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal)Property).Version = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal)Property).Version; } + + /// Creates an new instance. + public GiVersion() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// GiVersion resource definition + public partial interface IGiVersion : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A valid Oracle Grid Infrastructure (GI) software version.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + + } + /// GiVersion resource definition + internal partial interface IGiVersionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties Property { get; set; } + /// A valid Oracle Grid Infrastructure (GI) software version. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.json.cs new file mode 100644 index 000000000000..a54cfe049630 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersion.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// GiVersion resource definition + public partial class GiVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new GiVersion(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal GiVersion(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..7c3ec90e9bf5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a GiVersion list operation. + [System.ComponentModel.TypeConverter(typeof(GiVersionListResultTypeConverter))] + public partial class GiVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a GiVersion list operation. + [System.ComponentModel.TypeConverter(typeof(GiVersionListResultTypeConverter))] + public partial interface IGiVersionListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..2bd34bf50cf8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.cs new file mode 100644 index 000000000000..45cd13346783 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a GiVersion list operation. + public partial class GiVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The GiVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public GiVersionListResult() + { + + } + } + /// The response of a GiVersion list operation. + public partial interface IGiVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The GiVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The GiVersion items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a GiVersion list operation. + internal partial interface IGiVersionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The GiVersion items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.json.cs new file mode 100644 index 000000000000..6ad663348e6f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a GiVersion list operation. + public partial class GiVersionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new GiVersionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal GiVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersion.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..4957d78ffe2c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// GiVersion resource model + [System.ComponentModel.TypeConverter(typeof(GiVersionPropertiesTypeConverter))] + public partial class GiVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// GiVersion resource model + [System.ComponentModel.TypeConverter(typeof(GiVersionPropertiesTypeConverter))] + public partial interface IGiVersionProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.TypeConverter.cs new file mode 100644 index 000000000000..c9c6075eab86 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiVersionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiVersionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiVersionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiVersionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.cs new file mode 100644 index 000000000000..7f53ba11c9f1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// GiVersion resource model + public partial class GiVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal + { + + /// Internal Acessors for Version + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionPropertiesInternal.Version { get => this._version; set { {_version = value;} } } + + /// Backing field for property. + private string _version; + + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Version { get => this._version; } + + /// Creates an new instance. + public GiVersionProperties() + { + + } + } + /// GiVersion resource model + public partial interface IGiVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A valid Oracle Grid Infrastructure (GI) software version.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; } + + } + /// GiVersion resource model + internal partial interface IGiVersionPropertiesInternal + + { + /// A valid Oracle Grid Infrastructure (GI) software version. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.json.cs new file mode 100644 index 000000000000..453a9b5360ba --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/GiVersionProperties.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// GiVersion resource model + public partial class GiVersionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new GiVersionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal GiVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.PowerShell.cs new file mode 100644 index 000000000000..8036f8948f03 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Details for the long-term backup schedule. + [System.ComponentModel.TypeConverter(typeof(LongTermBackUpScheduleDetailsTypeConverter))] + public partial class LongTermBackUpScheduleDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LongTermBackUpScheduleDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LongTermBackUpScheduleDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LongTermBackUpScheduleDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence = (string) content.GetValueForProperty("RepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("TimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("TimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LongTermBackUpScheduleDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence = (string) content.GetValueForProperty("RepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence, global::System.Convert.ToString); + } + if (content.Contains("TimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("TimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details for the long-term backup schedule. + [System.ComponentModel.TypeConverter(typeof(LongTermBackUpScheduleDetailsTypeConverter))] + public partial interface ILongTermBackUpScheduleDetails + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.TypeConverter.cs new file mode 100644 index 000000000000..216c4d3e2a9b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LongTermBackUpScheduleDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LongTermBackUpScheduleDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LongTermBackUpScheduleDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LongTermBackUpScheduleDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.cs new file mode 100644 index 000000000000..64a19a6e4d04 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Details for the long-term backup schedule. + public partial class LongTermBackUpScheduleDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetailsInternal + { + + /// Backing field for property. + private bool? _isDisabled; + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsDisabled { get => this._isDisabled; set => this._isDisabled = value; } + + /// Backing field for property. + private string _repeatCadence; + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string RepeatCadence { get => this._repeatCadence; set => this._repeatCadence = value; } + + /// Backing field for property. + private int? _retentionPeriodInDay; + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? RetentionPeriodInDay { get => this._retentionPeriodInDay; set => this._retentionPeriodInDay = value; } + + /// Backing field for property. + private global::System.DateTime? _timeOfBackup; + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeOfBackup { get => this._timeOfBackup; set => this._timeOfBackup = value; } + + /// Creates an new instance. + public LongTermBackUpScheduleDetails() + { + + } + } + /// Details for the long-term backup schedule. + public partial interface ILongTermBackUpScheduleDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string RepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeOfBackup { get; set; } + + } + /// Details for the long-term backup schedule. + internal partial interface ILongTermBackUpScheduleDetailsInternal + + { + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? IsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + string RepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? RetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? TimeOfBackup { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.json.cs new file mode 100644 index 000000000000..ae370b399a2f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/LongTermBackUpScheduleDetails.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Details for the long-term backup schedule. + public partial class LongTermBackUpScheduleDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ILongTermBackUpScheduleDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new LongTermBackUpScheduleDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal LongTermBackUpScheduleDetails(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_repeatCadence = If( json?.PropertyT("repeatCadence"), out var __jsonRepeatCadence) ? (string)__jsonRepeatCadence : (string)_repeatCadence;} + {_timeOfBackup = If( json?.PropertyT("timeOfBackup"), out var __jsonTimeOfBackup) ? global::System.DateTime.TryParse((string)__jsonTimeOfBackup, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeOfBackupValue) ? __jsonTimeOfBackupValue : _timeOfBackup : _timeOfBackup;} + {_retentionPeriodInDay = If( json?.PropertyT("retentionPeriodInDays"), out var __jsonRetentionPeriodInDays) ? (int?)__jsonRetentionPeriodInDays : _retentionPeriodInDay;} + {_isDisabled = If( json?.PropertyT("isDisabled"), out var __jsonIsDisabled) ? (bool?)__jsonIsDisabled : _isDisabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._repeatCadence)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._repeatCadence.ToString()) : null, "repeatCadence" ,container.Add ); + AddIf( null != this._timeOfBackup ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeOfBackup?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeOfBackup" ,container.Add ); + AddIf( null != this._retentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._retentionPeriodInDay) : null, "retentionPeriodInDays" ,container.Add ); + AddIf( null != this._isDisabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isDisabled) : null, "isDisabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.PowerShell.cs new file mode 100644 index 000000000000..f015e1ce4f6b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.PowerShell.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// MaintenanceWindow resource properties + [System.ComponentModel.TypeConverter(typeof(MaintenanceWindowTypeConverter))] + public partial class MaintenanceWindow + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceWindow(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceWindow(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceWindow(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Preference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Preference = (string) content.GetValueForProperty("Preference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Preference, global::System.Convert.ToString); + } + if (content.Contains("Month")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Month = (System.Collections.Generic.List) content.GetValueForProperty("Month",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Month, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("WeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).WeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("WeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).WeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("DaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).DaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("DaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).DaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("HoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).HoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("HoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).HoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("LeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).LeadTimeInWeek = (int?) content.GetValueForProperty("LeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).LeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).PatchingMode = (string) content.GetValueForProperty("PatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).PatchingMode, global::System.Convert.ToString); + } + if (content.Contains("CustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin = (int?) content.GetValueForProperty("CustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("IsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("IsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MaintenanceWindow(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Preference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Preference = (string) content.GetValueForProperty("Preference",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Preference, global::System.Convert.ToString); + } + if (content.Contains("Month")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Month = (System.Collections.Generic.List) content.GetValueForProperty("Month",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).Month, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("WeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).WeeksOfMonth = (System.Collections.Generic.List) content.GetValueForProperty("WeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).WeeksOfMonth, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("DaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).DaysOfWeek = (System.Collections.Generic.List) content.GetValueForProperty("DaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).DaysOfWeek, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("HoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).HoursOfDay = (System.Collections.Generic.List) content.GetValueForProperty("HoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).HoursOfDay, __y => TypeConverterExtensions.SelectToList(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("LeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).LeadTimeInWeek = (int?) content.GetValueForProperty("LeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).LeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).PatchingMode = (string) content.GetValueForProperty("PatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).PatchingMode, global::System.Convert.ToString); + } + if (content.Contains("CustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin = (int?) content.GetValueForProperty("CustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("IsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("IsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// MaintenanceWindow resource properties + [System.ComponentModel.TypeConverter(typeof(MaintenanceWindowTypeConverter))] + public partial interface IMaintenanceWindow + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.TypeConverter.cs new file mode 100644 index 000000000000..aff13a021a77 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceWindowTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceWindow.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceWindow.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceWindow.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.cs new file mode 100644 index 000000000000..4551019baada --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.cs @@ -0,0 +1,298 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// MaintenanceWindow resource properties + public partial class MaintenanceWindow : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindowInternal + { + + /// Backing field for property. + private int? _customActionTimeoutInMin; + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? CustomActionTimeoutInMin { get => this._customActionTimeoutInMin; set => this._customActionTimeoutInMin = value; } + + /// Backing field for property. + private System.Collections.Generic.List _daysOfWeek; + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List DaysOfWeek { get => this._daysOfWeek; set => this._daysOfWeek = value; } + + /// Backing field for property. + private System.Collections.Generic.List _hoursOfDay; + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List HoursOfDay { get => this._hoursOfDay; set => this._hoursOfDay = value; } + + /// Backing field for property. + private bool? _isCustomActionTimeoutEnabled; + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsCustomActionTimeoutEnabled { get => this._isCustomActionTimeoutEnabled; set => this._isCustomActionTimeoutEnabled = value; } + + /// Backing field for property. + private bool? _isMonthlyPatchingEnabled; + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsMonthlyPatchingEnabled { get => this._isMonthlyPatchingEnabled; set => this._isMonthlyPatchingEnabled = value; } + + /// Backing field for property. + private int? _leadTimeInWeek; + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int? LeadTimeInWeek { get => this._leadTimeInWeek; set => this._leadTimeInWeek = value; } + + /// Backing field for property. + private System.Collections.Generic.List _month; + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Month { get => this._month; set => this._month = value; } + + /// Backing field for property. + private string _patchingMode; + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PatchingMode { get => this._patchingMode; set => this._patchingMode = value; } + + /// Backing field for property. + private string _preference; + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Preference { get => this._preference; set => this._preference = value; } + + /// Backing field for property. + private System.Collections.Generic.List _weeksOfMonth; + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List WeeksOfMonth { get => this._weeksOfMonth; set => this._weeksOfMonth = value; } + + /// Creates an new instance. + public MaintenanceWindow() + { + + } + } + /// MaintenanceWindow resource properties + public partial interface IMaintenanceWindow : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? CustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + System.Collections.Generic.List DaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List HoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? LeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + System.Collections.Generic.List Month { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string PatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string Preference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + System.Collections.Generic.List WeeksOfMonth { get; set; } + + } + /// MaintenanceWindow resource properties + internal partial interface IMaintenanceWindowInternal + + { + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + int? CustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + System.Collections.Generic.List DaysOfWeek { get; set; } + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + System.Collections.Generic.List HoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? IsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? IsMonthlyPatchingEnabled { get; set; } + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + int? LeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + System.Collections.Generic.List Month { get; set; } + /// Cloud Exadata infrastructure node patching method. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + string PatchingMode { get; set; } + /// The maintenance window scheduling preference. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + string Preference { get; set; } + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + System.Collections.Generic.List WeeksOfMonth { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.json.cs new file mode 100644 index 000000000000..f5cf6eb2be83 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/MaintenanceWindow.json.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// MaintenanceWindow resource properties + public partial class MaintenanceWindow + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMaintenanceWindow FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new MaintenanceWindow(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceWindow(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_preference = If( json?.PropertyT("preference"), out var __jsonPreference) ? (string)__jsonPreference : (string)_preference;} + {_month = If( json?.PropertyT("months"), out var __jsonMonths) ? If( __jsonMonths as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Month.FromJson(__u) )) ))() : null : _month;} + {_weeksOfMonth = If( json?.PropertyT("weeksOfMonth"), out var __jsonWeeksOfMonth) ? If( __jsonWeeksOfMonth as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(int) (__p is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber __o ? (int)__o : default(int))) ))() : null : _weeksOfMonth;} + {_daysOfWeek = If( json?.PropertyT("daysOfWeek"), out var __jsonDaysOfWeek) ? If( __jsonDaysOfWeek as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeek.FromJson(__k) )) ))() : null : _daysOfWeek;} + {_hoursOfDay = If( json?.PropertyT("hoursOfDay"), out var __jsonHoursOfDay) ? If( __jsonHoursOfDay as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(int) (__f is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber __e ? (int)__e : default(int))) ))() : null : _hoursOfDay;} + {_leadTimeInWeek = If( json?.PropertyT("leadTimeInWeeks"), out var __jsonLeadTimeInWeeks) ? (int?)__jsonLeadTimeInWeeks : _leadTimeInWeek;} + {_patchingMode = If( json?.PropertyT("patchingMode"), out var __jsonPatchingMode) ? (string)__jsonPatchingMode : (string)_patchingMode;} + {_customActionTimeoutInMin = If( json?.PropertyT("customActionTimeoutInMins"), out var __jsonCustomActionTimeoutInMins) ? (int?)__jsonCustomActionTimeoutInMins : _customActionTimeoutInMin;} + {_isCustomActionTimeoutEnabled = If( json?.PropertyT("isCustomActionTimeoutEnabled"), out var __jsonIsCustomActionTimeoutEnabled) ? (bool?)__jsonIsCustomActionTimeoutEnabled : _isCustomActionTimeoutEnabled;} + {_isMonthlyPatchingEnabled = If( json?.PropertyT("isMonthlyPatchingEnabled"), out var __jsonIsMonthlyPatchingEnabled) ? (bool?)__jsonIsMonthlyPatchingEnabled : _isMonthlyPatchingEnabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._preference)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._preference.ToString()) : null, "preference" ,container.Add ); + if (null != this._month) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._month ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("months",__w); + } + if (null != this._weeksOfMonth) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __s in this._weeksOfMonth ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber(__s) ,__r.Add); + } + container.Add("weeksOfMonth",__r); + } + if (null != this._daysOfWeek) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __n in this._daysOfWeek ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("daysOfWeek",__m); + } + if (null != this._hoursOfDay) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __i in this._hoursOfDay ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber(__i) ,__h.Add); + } + container.Add("hoursOfDay",__h); + } + AddIf( null != this._leadTimeInWeek ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._leadTimeInWeek) : null, "leadTimeInWeeks" ,container.Add ); + AddIf( null != (((object)this._patchingMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._patchingMode.ToString()) : null, "patchingMode" ,container.Add ); + AddIf( null != this._customActionTimeoutInMin ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber((int)this._customActionTimeoutInMin) : null, "customActionTimeoutInMins" ,container.Add ); + AddIf( null != this._isCustomActionTimeoutEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isCustomActionTimeoutEnabled) : null, "isCustomActionTimeoutEnabled" ,container.Add ); + AddIf( null != this._isMonthlyPatchingEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isMonthlyPatchingEnabled) : null, "isMonthlyPatchingEnabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Month.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.PowerShell.cs new file mode 100644 index 000000000000..50318c51fe42 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Month resource properties + [System.ComponentModel.TypeConverter(typeof(MonthTypeConverter))] + public partial class Month + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Month(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Month(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Month(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonthInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonthInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Month(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonthInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonthInternal)this).Name, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Month resource properties + [System.ComponentModel.TypeConverter(typeof(MonthTypeConverter))] + public partial interface IMonth + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Month.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.TypeConverter.cs new file mode 100644 index 000000000000..09a4dd3e096b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MonthTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Month.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Month.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Month.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Month.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.cs new file mode 100644 index 000000000000..046b2b848909 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Month resource properties + public partial class Month : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonthInternal + { + + /// Backing field for property. + private string _name; + + /// Name of the month of the year. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public Month() + { + + } + } + /// Month resource properties + public partial interface IMonth : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Name of the month of the year. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the month of the year.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")] + string Name { get; set; } + + } + /// Month resource properties + internal partial interface IMonthInternal + + { + /// Name of the month of the year. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")] + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Month.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.json.cs new file mode 100644 index 000000000000..882f33cad748 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Month.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Month resource properties + public partial class Month + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new Month(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal Month(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.PowerShell.cs new file mode 100644 index 000000000000..f889a359f85f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// A rule for allowing inbound (INGRESS) IP packets + [System.ComponentModel.TypeConverter(typeof(NsgCidrTypeConverter))] + public partial class NsgCidr + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NsgCidr(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NsgCidr(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NsgCidr(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DestinationPortRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRange = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRange, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PortRangeTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("DestinationPortRangeMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMin = (int) content.GetValueForProperty("DestinationPortRangeMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationPortRangeMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMax = (int) content.GetValueForProperty("DestinationPortRangeMax",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal NsgCidr(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DestinationPortRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRange = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRange, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PortRangeTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("DestinationPortRangeMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMin = (int) content.GetValueForProperty("DestinationPortRangeMin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationPortRangeMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMax = (int) content.GetValueForProperty("DestinationPortRangeMax",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal)this).DestinationPortRangeMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A rule for allowing inbound (INGRESS) IP packets + [System.ComponentModel.TypeConverter(typeof(NsgCidrTypeConverter))] + public partial interface INsgCidr + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.TypeConverter.cs new file mode 100644 index 000000000000..3159491c16eb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class NsgCidrTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return NsgCidr.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return NsgCidr.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return NsgCidr.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.cs new file mode 100644 index 000000000000..c78f4e5ef186 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// A rule for allowing inbound (INGRESS) IP packets + public partial class NsgCidr : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange _destinationPortRange; + + /// Destination port range to specify particular destination ports for TCP rules. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange DestinationPortRange { get => (this._destinationPortRange = this._destinationPortRange ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PortRange()); set => this._destinationPortRange = value; } + + /// + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both + /// the min and max to the same value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DestinationPortRangeMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)DestinationPortRange).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)DestinationPortRange).Max = value ?? default(int); } + + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public int? DestinationPortRangeMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)DestinationPortRange).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)DestinationPortRange).Min = value ?? default(int); } + + /// Internal Acessors for DestinationPortRange + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidrInternal.DestinationPortRange { get => (this._destinationPortRange = this._destinationPortRange ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PortRange()); set { {_destinationPortRange = value;} } } + + /// Backing field for property. + private string _source; + + /// + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Source { get => this._source; set => this._source = value; } + + /// Creates an new instance. + public NsgCidr() + { + + } + } + /// A rule for allowing inbound (INGRESS) IP packets + public partial interface INsgCidr : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both + /// the min and max to the same value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value.", + SerializedName = @"max", + PossibleTypes = new [] { typeof(int) })] + int? DestinationPortRangeMax { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The minimum port number, which must not be greater than the maximum port number.", + SerializedName = @"min", + PossibleTypes = new [] { typeof(int) })] + int? DestinationPortRangeMin { get; set; } + /// + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.", + SerializedName = @"source", + PossibleTypes = new [] { typeof(string) })] + string Source { get; set; } + + } + /// A rule for allowing inbound (INGRESS) IP packets + internal partial interface INsgCidrInternal + + { + /// Destination port range to specify particular destination ports for TCP rules. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange DestinationPortRange { get; set; } + /// + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both + /// the min and max to the same value. + /// + int? DestinationPortRangeMax { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + int? DestinationPortRangeMin { get; set; } + /// + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// + string Source { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.json.cs new file mode 100644 index 000000000000..c6565a797b98 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/NsgCidr.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// A rule for allowing inbound (INGRESS) IP packets + public partial class NsgCidr + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new NsgCidr(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal NsgCidr(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_destinationPortRange = If( json?.PropertyT("destinationPortRange"), out var __jsonDestinationPortRange) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PortRange.FromJson(__jsonDestinationPortRange) : _destinationPortRange;} + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)_source;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._destinationPortRange ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._destinationPortRange.ToJson(null,serializationMode) : null, "destinationPortRange" ,container.Add ); + AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.PowerShell.cs new file mode 100644 index 000000000000..cbbf949ed146 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.PowerShell.cs @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial class Operation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Operation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Operation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Operation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Operation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).Origin, global::System.Convert.ToString); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).ActionType = (string) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).ActionType, global::System.Convert.ToString); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial interface IOperation + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.TypeConverter.cs new file mode 100644 index 000000000000..708f5c03ea41 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Operation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Operation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.cs new file mode 100644 index 000000000000..629ec7f80906 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal + { + + /// Backing field for property. + private string _actionType; + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ActionType { get => this._actionType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay _display; + + /// Localized display information for this particular operation. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationDisplay()); set => this._display = value; } + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Description; } + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Operation; } + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Provider; } + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Resource; } + + /// Backing field for property. + private bool? _isDataAction; + + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; } + + /// Internal Acessors for ActionType + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Description = value; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Operation = value; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Provider = value; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)Display).Resource = value; } + + /// Internal Acessors for IsDataAction + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Origin + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + + /// Backing field for property. + private string _name; + + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private string _origin; + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Origin { get => this._origin; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.", + SerializedName = @"actionType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; } + + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + internal partial interface IOperationInternal + + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Internal")] + string ActionType { get; set; } + /// Localized display information for this particular operation. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay Display { get; set; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string DisplayDescription { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string DisplayOperation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string DisplayProvider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string DisplayResource { get; set; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + bool? IsDataAction { get; set; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + string Name { get; set; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("user", "system", "user,system")] + string Origin { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.json.cs new file mode 100644 index 000000000000..3b8453c44e09 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Operation.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationDisplay.FromJson(__jsonDisplay) : _display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : _isDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)_origin;} + {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)_actionType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs new file mode 100644 index 000000000000..c340a09f647e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial class OperationDisplay + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationDisplay(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationDisplay(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationDisplay(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationDisplay(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial interface IOperationDisplay + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs new file mode 100644 index 000000000000..0a83dcc255fc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.cs new file mode 100644 index 000000000000..ad7c3e037245 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Operation + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for Provider + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + + /// Internal Acessors for Resource + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Backing field for property. + private string _operation; + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Operation { get => this._operation; } + + /// Backing field for property. + private string _provider; + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Provider { get => this._provider; } + + /// Backing field for property. + private string _resource; + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Resource { get => this._resource; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// Localized display information for this particular operation. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; } + + } + /// Localized display information for this particular operation. + internal partial interface IOperationDisplayInternal + + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string Description { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string Operation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string Provider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.json.cs new file mode 100644 index 000000000000..d7b32861f328 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationDisplay.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)_provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)_resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)_operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.PowerShell.cs new file mode 100644 index 000000000000..bae52c77d86f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial class OperationListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial interface IOperationListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs new file mode 100644 index 000000000000..4e0cd99049de --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.cs new file mode 100644 index 000000000000..ecc596dc8c5c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + System.Collections.Generic.List Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; } + + /// Creates an new instance. + public OperationListResult() + { + + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + public partial interface IOperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"URL to get the next set of operation list results (if there are any).", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"List of operations supported by the resource provider", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation) })] + System.Collections.Generic.List Value { get; } + + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + internal partial interface IOperationListResultInternal + + { + /// URL to get the next set of operation list results (if there are any). + string NextLink { get; set; } + /// List of operations supported by the resource provider + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.json.cs new file mode 100644 index 000000000000..08888de1b81d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OperationListResult.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Operation.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.PowerShell.cs new file mode 100644 index 000000000000..da4f08bc5c45 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.PowerShell.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleIdentityTypeConverter))] + public partial class OracleIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdatabasename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdatabasename = (string) content.GetValueForProperty("Autonomousdatabasename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdatabasename, global::System.Convert.ToString); + } + if (content.Contains("Cloudexadatainfrastructurename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudexadatainfrastructurename = (string) content.GetValueForProperty("Cloudexadatainfrastructurename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudexadatainfrastructurename, global::System.Convert.ToString); + } + if (content.Contains("Cloudvmclustername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudvmclustername = (string) content.GetValueForProperty("Cloudvmclustername",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudvmclustername, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Adbscharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbscharsetname = (string) content.GetValueForProperty("Adbscharsetname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbscharsetname, global::System.Convert.ToString); + } + if (content.Contains("Adbsncharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbsncharsetname = (string) content.GetValueForProperty("Adbsncharsetname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbsncharsetname, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdbversionsname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdbversionsname = (string) content.GetValueForProperty("Autonomousdbversionsname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdbversionsname, global::System.Convert.ToString); + } + if (content.Contains("Dbsystemshapename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbsystemshapename = (string) content.GetValueForProperty("Dbsystemshapename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbsystemshapename, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivateviewocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivateviewocid = (string) content.GetValueForProperty("Dnsprivateviewocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivateviewocid, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivatezonename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivatezonename = (string) content.GetValueForProperty("Dnsprivatezonename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivatezonename, global::System.Convert.ToString); + } + if (content.Contains("Giversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Giversionname = (string) content.GetValueForProperty("Giversionname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Giversionname, global::System.Convert.ToString); + } + if (content.Contains("Systemversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Systemversionname = (string) content.GetValueForProperty("Systemversionname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Systemversionname, global::System.Convert.ToString); + } + if (content.Contains("Adbbackupid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbbackupid = (string) content.GetValueForProperty("Adbbackupid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbbackupid, global::System.Convert.ToString); + } + if (content.Contains("Dbserverocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbserverocid = (string) content.GetValueForProperty("Dbserverocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbserverocid, global::System.Convert.ToString); + } + if (content.Contains("Dbnodeocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbnodeocid = (string) content.GetValueForProperty("Dbnodeocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbnodeocid, global::System.Convert.ToString); + } + if (content.Contains("Virtualnetworkaddressname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Virtualnetworkaddressname = (string) content.GetValueForProperty("Virtualnetworkaddressname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Virtualnetworkaddressname, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdatabasename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdatabasename = (string) content.GetValueForProperty("Autonomousdatabasename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdatabasename, global::System.Convert.ToString); + } + if (content.Contains("Cloudexadatainfrastructurename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudexadatainfrastructurename = (string) content.GetValueForProperty("Cloudexadatainfrastructurename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudexadatainfrastructurename, global::System.Convert.ToString); + } + if (content.Contains("Cloudvmclustername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudvmclustername = (string) content.GetValueForProperty("Cloudvmclustername",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Cloudvmclustername, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Adbscharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbscharsetname = (string) content.GetValueForProperty("Adbscharsetname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbscharsetname, global::System.Convert.ToString); + } + if (content.Contains("Adbsncharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbsncharsetname = (string) content.GetValueForProperty("Adbsncharsetname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbsncharsetname, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdbversionsname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdbversionsname = (string) content.GetValueForProperty("Autonomousdbversionsname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Autonomousdbversionsname, global::System.Convert.ToString); + } + if (content.Contains("Dbsystemshapename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbsystemshapename = (string) content.GetValueForProperty("Dbsystemshapename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbsystemshapename, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivateviewocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivateviewocid = (string) content.GetValueForProperty("Dnsprivateviewocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivateviewocid, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivatezonename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivatezonename = (string) content.GetValueForProperty("Dnsprivatezonename",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dnsprivatezonename, global::System.Convert.ToString); + } + if (content.Contains("Giversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Giversionname = (string) content.GetValueForProperty("Giversionname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Giversionname, global::System.Convert.ToString); + } + if (content.Contains("Systemversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Systemversionname = (string) content.GetValueForProperty("Systemversionname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Systemversionname, global::System.Convert.ToString); + } + if (content.Contains("Adbbackupid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbbackupid = (string) content.GetValueForProperty("Adbbackupid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Adbbackupid, global::System.Convert.ToString); + } + if (content.Contains("Dbserverocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbserverocid = (string) content.GetValueForProperty("Dbserverocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbserverocid, global::System.Convert.ToString); + } + if (content.Contains("Dbnodeocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbnodeocid = (string) content.GetValueForProperty("Dbnodeocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Dbnodeocid, global::System.Convert.ToString); + } + if (content.Contains("Virtualnetworkaddressname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Virtualnetworkaddressname = (string) content.GetValueForProperty("Virtualnetworkaddressname",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Virtualnetworkaddressname, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + [System.ComponentModel.TypeConverter(typeof(OracleIdentityTypeConverter))] + public partial interface IOracleIdentity + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.TypeConverter.cs new file mode 100644 index 000000000000..7d03f98ddaed --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.TypeConverter.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + // we allow string conversion too. + if (type == typeof(global::System.String)) + { + return true; + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + // support direct string to id type conversion. + if (type == typeof(global::System.String)) + { + return new OracleIdentity { Id = sourceValue }; + } + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleIdentity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.cs new file mode 100644 index 000000000000..c5fc0ba92532 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.cs @@ -0,0 +1,411 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public partial class OracleIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentityInternal + { + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// Backing field for property. + private string _adbscharsetname; + + /// AutonomousDatabaseCharacterSet name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Adbscharsetname { get => this._adbscharsetname; set => this._adbscharsetname = value; } + + /// Backing field for property. + private string _adbsncharsetname; + + /// AutonomousDatabaseNationalCharacterSets name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Adbsncharsetname { get => this._adbsncharsetname; set => this._adbsncharsetname = value; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Backing field for property. + private string _autonomousdbversionsname; + + /// AutonomousDbVersion name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Autonomousdbversionsname { get => this._autonomousdbversionsname; set => this._autonomousdbversionsname = value; } + + /// Backing field for property. + private string _cloudexadatainfrastructurename; + + /// CloudExadataInfrastructure name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Cloudexadatainfrastructurename { get => this._cloudexadatainfrastructurename; set => this._cloudexadatainfrastructurename = value; } + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// Backing field for property. + private string _dbserverocid; + + /// DbServer OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Dbserverocid { get => this._dbserverocid; set => this._dbserverocid = value; } + + /// Backing field for property. + private string _dbsystemshapename; + + /// DbSystemShape name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Dbsystemshapename { get => this._dbsystemshapename; set => this._dbsystemshapename = value; } + + /// Backing field for property. + private string _dnsprivateviewocid; + + /// DnsPrivateView OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Dnsprivateviewocid { get => this._dnsprivateviewocid; set => this._dnsprivateviewocid = value; } + + /// Backing field for property. + private string _dnsprivatezonename; + + /// DnsPrivateZone name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Dnsprivatezonename { get => this._dnsprivatezonename; set => this._dnsprivatezonename = value; } + + /// Backing field for property. + private string _giversionname; + + /// GiVersion name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Giversionname { get => this._giversionname; set => this._giversionname = value; } + + /// Backing field for property. + private string _id; + + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _systemversionname; + + /// SystemVersion name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Systemversionname { get => this._systemversionname; set => this._systemversionname = value; } + + /// Backing field for property. + private string _virtualnetworkaddressname; + + /// Virtual IP address hostname. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Virtualnetworkaddressname { get => this._virtualnetworkaddressname; set => this._virtualnetworkaddressname = value; } + + /// Creates an new instance. + public OracleIdentity() + { + + } + } + public partial interface IOracleIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// AutonomousDatabaseBackup id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + string Adbbackupid { get; set; } + /// AutonomousDatabaseCharacterSet name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"AutonomousDatabaseCharacterSet name", + SerializedName = @"adbscharsetname", + PossibleTypes = new [] { typeof(string) })] + string Adbscharsetname { get; set; } + /// AutonomousDatabaseNationalCharacterSets name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"AutonomousDatabaseNationalCharacterSets name", + SerializedName = @"adbsncharsetname", + PossibleTypes = new [] { typeof(string) })] + string Adbsncharsetname { get; set; } + /// The database name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + string Autonomousdatabasename { get; set; } + /// AutonomousDbVersion name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"AutonomousDbVersion name", + SerializedName = @"autonomousdbversionsname", + PossibleTypes = new [] { typeof(string) })] + string Autonomousdbversionsname { get; set; } + /// CloudExadataInfrastructure name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + string Cloudexadatainfrastructurename { get; set; } + /// CloudVmCluster name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + string Cloudvmclustername { get; set; } + /// DbNode OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + string Dbnodeocid { get; set; } + /// DbServer OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DbServer OCID.", + SerializedName = @"dbserverocid", + PossibleTypes = new [] { typeof(string) })] + string Dbserverocid { get; set; } + /// DbSystemShape name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DbSystemShape name", + SerializedName = @"dbsystemshapename", + PossibleTypes = new [] { typeof(string) })] + string Dbsystemshapename { get; set; } + /// DnsPrivateView OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DnsPrivateView OCID", + SerializedName = @"dnsprivateviewocid", + PossibleTypes = new [] { typeof(string) })] + string Dnsprivateviewocid { get; set; } + /// DnsPrivateZone name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"DnsPrivateZone name", + SerializedName = @"dnsprivatezonename", + PossibleTypes = new [] { typeof(string) })] + string Dnsprivatezonename { get; set; } + /// GiVersion name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"GiVersion name", + SerializedName = @"giversionname", + PossibleTypes = new [] { typeof(string) })] + string Giversionname { get; set; } + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource identity path", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// The name of the Azure region. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// The name of the resource group. The name is case insensitive. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + /// SystemVersion name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"SystemVersion name", + SerializedName = @"systemversionname", + PossibleTypes = new [] { typeof(string) })] + string Systemversionname { get; set; } + /// Virtual IP address hostname. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Virtual IP address hostname.", + SerializedName = @"virtualnetworkaddressname", + PossibleTypes = new [] { typeof(string) })] + string Virtualnetworkaddressname { get; set; } + + } + internal partial interface IOracleIdentityInternal + + { + /// AutonomousDatabaseBackup id + string Adbbackupid { get; set; } + /// AutonomousDatabaseCharacterSet name + string Adbscharsetname { get; set; } + /// AutonomousDatabaseNationalCharacterSets name + string Adbsncharsetname { get; set; } + /// The database name. + string Autonomousdatabasename { get; set; } + /// AutonomousDbVersion name + string Autonomousdbversionsname { get; set; } + /// CloudExadataInfrastructure name + string Cloudexadatainfrastructurename { get; set; } + /// CloudVmCluster name + string Cloudvmclustername { get; set; } + /// DbNode OCID. + string Dbnodeocid { get; set; } + /// DbServer OCID. + string Dbserverocid { get; set; } + /// DbSystemShape name + string Dbsystemshapename { get; set; } + /// DnsPrivateView OCID + string Dnsprivateviewocid { get; set; } + /// DnsPrivateZone name + string Dnsprivatezonename { get; set; } + /// GiVersion name + string Giversionname { get; set; } + /// Resource identity path + string Id { get; set; } + /// The name of the Azure region. + string Location { get; set; } + /// The name of the resource group. The name is case insensitive. + string ResourceGroupName { get; set; } + /// The ID of the target subscription. The value must be an UUID. + string SubscriptionId { get; set; } + /// SystemVersion name + string Systemversionname { get; set; } + /// Virtual IP address hostname. + string Virtualnetworkaddressname { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.json.cs new file mode 100644 index 000000000000..29c32400fcb7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleIdentity.json.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public partial class OracleIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OracleIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OracleIdentity(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)_subscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)_resourceGroupName;} + {_autonomousdatabasename = If( json?.PropertyT("autonomousdatabasename"), out var __jsonAutonomousdatabasename) ? (string)__jsonAutonomousdatabasename : (string)_autonomousdatabasename;} + {_cloudexadatainfrastructurename = If( json?.PropertyT("cloudexadatainfrastructurename"), out var __jsonCloudexadatainfrastructurename) ? (string)__jsonCloudexadatainfrastructurename : (string)_cloudexadatainfrastructurename;} + {_cloudvmclustername = If( json?.PropertyT("cloudvmclustername"), out var __jsonCloudvmclustername) ? (string)__jsonCloudvmclustername : (string)_cloudvmclustername;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + {_adbscharsetname = If( json?.PropertyT("adbscharsetname"), out var __jsonAdbscharsetname) ? (string)__jsonAdbscharsetname : (string)_adbscharsetname;} + {_adbsncharsetname = If( json?.PropertyT("adbsncharsetname"), out var __jsonAdbsncharsetname) ? (string)__jsonAdbsncharsetname : (string)_adbsncharsetname;} + {_autonomousdbversionsname = If( json?.PropertyT("autonomousdbversionsname"), out var __jsonAutonomousdbversionsname) ? (string)__jsonAutonomousdbversionsname : (string)_autonomousdbversionsname;} + {_dbsystemshapename = If( json?.PropertyT("dbsystemshapename"), out var __jsonDbsystemshapename) ? (string)__jsonDbsystemshapename : (string)_dbsystemshapename;} + {_dnsprivateviewocid = If( json?.PropertyT("dnsprivateviewocid"), out var __jsonDnsprivateviewocid) ? (string)__jsonDnsprivateviewocid : (string)_dnsprivateviewocid;} + {_dnsprivatezonename = If( json?.PropertyT("dnsprivatezonename"), out var __jsonDnsprivatezonename) ? (string)__jsonDnsprivatezonename : (string)_dnsprivatezonename;} + {_giversionname = If( json?.PropertyT("giversionname"), out var __jsonGiversionname) ? (string)__jsonGiversionname : (string)_giversionname;} + {_systemversionname = If( json?.PropertyT("systemversionname"), out var __jsonSystemversionname) ? (string)__jsonSystemversionname : (string)_systemversionname;} + {_adbbackupid = If( json?.PropertyT("adbbackupid"), out var __jsonAdbbackupid) ? (string)__jsonAdbbackupid : (string)_adbbackupid;} + {_dbserverocid = If( json?.PropertyT("dbserverocid"), out var __jsonDbserverocid) ? (string)__jsonDbserverocid : (string)_dbserverocid;} + {_dbnodeocid = If( json?.PropertyT("dbnodeocid"), out var __jsonDbnodeocid) ? (string)__jsonDbnodeocid : (string)_dbnodeocid;} + {_virtualnetworkaddressname = If( json?.PropertyT("virtualnetworkaddressname"), out var __jsonVirtualnetworkaddressname) ? (string)__jsonVirtualnetworkaddressname : (string)_virtualnetworkaddressname;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._autonomousdatabasename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._autonomousdatabasename.ToString()) : null, "autonomousdatabasename" ,container.Add ); + AddIf( null != (((object)this._cloudexadatainfrastructurename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloudexadatainfrastructurename.ToString()) : null, "cloudexadatainfrastructurename" ,container.Add ); + AddIf( null != (((object)this._cloudvmclustername)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloudvmclustername.ToString()) : null, "cloudvmclustername" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != (((object)this._adbscharsetname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._adbscharsetname.ToString()) : null, "adbscharsetname" ,container.Add ); + AddIf( null != (((object)this._adbsncharsetname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._adbsncharsetname.ToString()) : null, "adbsncharsetname" ,container.Add ); + AddIf( null != (((object)this._autonomousdbversionsname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._autonomousdbversionsname.ToString()) : null, "autonomousdbversionsname" ,container.Add ); + AddIf( null != (((object)this._dbsystemshapename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbsystemshapename.ToString()) : null, "dbsystemshapename" ,container.Add ); + AddIf( null != (((object)this._dnsprivateviewocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dnsprivateviewocid.ToString()) : null, "dnsprivateviewocid" ,container.Add ); + AddIf( null != (((object)this._dnsprivatezonename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dnsprivatezonename.ToString()) : null, "dnsprivatezonename" ,container.Add ); + AddIf( null != (((object)this._giversionname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._giversionname.ToString()) : null, "giversionname" ,container.Add ); + AddIf( null != (((object)this._systemversionname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._systemversionname.ToString()) : null, "systemversionname" ,container.Add ); + AddIf( null != (((object)this._adbbackupid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._adbbackupid.ToString()) : null, "adbbackupid" ,container.Add ); + AddIf( null != (((object)this._dbserverocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbserverocid.ToString()) : null, "dbserverocid" ,container.Add ); + AddIf( null != (((object)this._dbnodeocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._dbnodeocid.ToString()) : null, "dbnodeocid" ,container.Add ); + AddIf( null != (((object)this._virtualnetworkaddressname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._virtualnetworkaddressname.ToString()) : null, "virtualnetworkaddressname" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.PowerShell.cs new file mode 100644 index 000000000000..00aa9d6d65a4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.PowerShell.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// OracleSubscription resource definition + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionTypeConverter))] + public partial class OracleSubscription + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscription(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscription(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscription(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Intent, global::System.Convert.ToString); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountState = (string) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountState, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProductCode, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscription(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).Intent, global::System.Convert.ToString); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountState = (string) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).CloudAccountState, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal)this).ProductCode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// OracleSubscription resource definition + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionTypeConverter))] + public partial interface IOracleSubscription + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.TypeConverter.cs new file mode 100644 index 000000000000..5b61a780fd4e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscription.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscription.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscription.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.cs new file mode 100644 index 000000000000..a2d47d1de673 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.cs @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// OracleSubscription resource definition + public partial class OracleSubscription : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CloudAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).CloudAccountId; } + + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string CloudAccountState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).CloudAccountState; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Intent { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).Intent; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).Intent = value ?? null; } + + /// Internal Acessors for CloudAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal.CloudAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).CloudAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).CloudAccountId = value; } + + /// Internal Acessors for CloudAccountState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal.CloudAccountState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).CloudAccountState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).CloudAccountState = value; } + + /// Internal Acessors for Plan + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal.Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Plan()); set { {_plan = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SaasSubscriptionId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionInternal.SaasSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).SaasSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).SaasSubscriptionId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan _plan; + + /// Details of the resource plan. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Plan()); set => this._plan = value; } + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Name = value ?? null; } + + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Product = value ?? null; } + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanPromotionCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).PromotionCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).PromotionCode = value ?? null; } + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Publisher = value ?? null; } + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)Plan).Version = value ?? null; } + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProductCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).ProductCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).ProductCode = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionProperties()); set => this._property = value; } + + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SaasSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).SaasSubscriptionId; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string TermUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).TermUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)Property).TermUnit = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public OracleSubscription() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// OracleSubscription resource definition + public partial interface IOracleSubscription : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud Account Id", + SerializedName = @"cloudAccountId", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountId { get; } + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud Account provisioning state.", + SerializedName = @"cloudAccountState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Pending", "Provisioning", "Available")] + string CloudAccountState { get; } + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string PlanName { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string PlanVersion { get; set; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"OracleSubscriptionProvisioningState provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"SAAS subscription ID generated by Marketplace", + SerializedName = @"saasSubscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SaasSubscriptionId { get; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601", + SerializedName = @"termUnit", + PossibleTypes = new [] { typeof(string) })] + string TermUnit { get; set; } + + } + /// OracleSubscription resource definition + internal partial interface IOracleSubscriptionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// Cloud Account Id + string CloudAccountId { get; set; } + /// Cloud Account provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Pending", "Provisioning", "Available")] + string CloudAccountState { get; set; } + /// Intent for the update operation + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// Details of the resource plan. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan Plan { get; set; } + /// A user defined name of the 3rd Party Artifact that is being procured. + string PlanName { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + string PlanVersion { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties Property { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// SAAS subscription ID generated by Marketplace + string SaasSubscriptionId { get; set; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + string TermUnit { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.json.cs new file mode 100644 index 000000000000..100f1d29a383 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscription.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// OracleSubscription resource definition + public partial class OracleSubscription + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OracleSubscription(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscription(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionProperties.FromJson(__jsonProperties) : _property;} + {_plan = If( json?.PropertyT("plan"), out var __jsonPlan) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Plan.FromJson(__jsonPlan) : _plan;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._plan ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._plan.ToJson(null,serializationMode) : null, "plan" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.PowerShell.cs new file mode 100644 index 000000000000..7a60d359428e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a OracleSubscription list operation. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionListResultTypeConverter))] + public partial class OracleSubscriptionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a OracleSubscription list operation. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionListResultTypeConverter))] + public partial interface IOracleSubscriptionListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.TypeConverter.cs new file mode 100644 index 000000000000..3abc3b4d0fd1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.cs new file mode 100644 index 000000000000..0b400dd1244d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a OracleSubscription list operation. + public partial class OracleSubscriptionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The OracleSubscription items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public OracleSubscriptionListResult() + { + + } + } + /// The response of a OracleSubscription list operation. + public partial interface IOracleSubscriptionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The OracleSubscription items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The OracleSubscription items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a OracleSubscription list operation. + internal partial interface IOracleSubscriptionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The OracleSubscription items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.json.cs new file mode 100644 index 000000000000..8f50ec49b843 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a OracleSubscription list operation. + public partial class OracleSubscriptionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OracleSubscriptionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.PowerShell.cs new file mode 100644 index 000000000000..0c5854d42d9e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.PowerShell.cs @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Oracle Subscription resource model + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionPropertiesTypeConverter))] + public partial class OracleSubscriptionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountState = (string) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountState, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).Intent, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountState = (string) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).CloudAccountState, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal)this).Intent, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Oracle Subscription resource model + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionPropertiesTypeConverter))] + public partial interface IOracleSubscriptionProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.TypeConverter.cs new file mode 100644 index 000000000000..51e115417c4e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.cs new file mode 100644 index 000000000000..d3e94faaa217 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Oracle Subscription resource model + public partial class OracleSubscriptionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal + { + + /// Backing field for property. + private string _cloudAccountId; + + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CloudAccountId { get => this._cloudAccountId; } + + /// Backing field for property. + private string _cloudAccountState; + + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CloudAccountState { get => this._cloudAccountState; } + + /// Backing field for property. + private string _intent; + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Intent { get => this._intent; set => this._intent = value; } + + /// Internal Acessors for CloudAccountId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal.CloudAccountId { get => this._cloudAccountId; set { {_cloudAccountId = value;} } } + + /// Internal Acessors for CloudAccountState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal.CloudAccountState { get => this._cloudAccountState; set { {_cloudAccountState = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SaasSubscriptionId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionPropertiesInternal.SaasSubscriptionId { get => this._saasSubscriptionId; set { {_saasSubscriptionId = value;} } } + + /// Backing field for property. + private string _productCode; + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProductCode { get => this._productCode; set => this._productCode = value; } + + /// Backing field for property. + private string _provisioningState; + + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _saasSubscriptionId; + + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SaasSubscriptionId { get => this._saasSubscriptionId; } + + /// Backing field for property. + private string _termUnit; + + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TermUnit { get => this._termUnit; set => this._termUnit = value; } + + /// Creates an new instance. + public OracleSubscriptionProperties() + { + + } + } + /// Oracle Subscription resource model + public partial interface IOracleSubscriptionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud Account Id", + SerializedName = @"cloudAccountId", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountId { get; } + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Cloud Account provisioning state.", + SerializedName = @"cloudAccountState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Pending", "Provisioning", "Available")] + string CloudAccountState { get; } + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"OracleSubscriptionProvisioningState provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; } + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"SAAS subscription ID generated by Marketplace", + SerializedName = @"saasSubscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SaasSubscriptionId { get; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601", + SerializedName = @"termUnit", + PossibleTypes = new [] { typeof(string) })] + string TermUnit { get; set; } + + } + /// Oracle Subscription resource model + internal partial interface IOracleSubscriptionPropertiesInternal + + { + /// Cloud Account Id + string CloudAccountId { get; set; } + /// Cloud Account provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Pending", "Provisioning", "Available")] + string CloudAccountState { get; set; } + /// Intent for the update operation + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled")] + string ProvisioningState { get; set; } + /// SAAS subscription ID generated by Marketplace + string SaasSubscriptionId { get; set; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + string TermUnit { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.json.cs new file mode 100644 index 000000000000..07e4b2ad71a1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionProperties.json.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Oracle Subscription resource model + public partial class OracleSubscriptionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OracleSubscriptionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_saasSubscriptionId = If( json?.PropertyT("saasSubscriptionId"), out var __jsonSaasSubscriptionId) ? (string)__jsonSaasSubscriptionId : (string)_saasSubscriptionId;} + {_cloudAccountId = If( json?.PropertyT("cloudAccountId"), out var __jsonCloudAccountId) ? (string)__jsonCloudAccountId : (string)_cloudAccountId;} + {_cloudAccountState = If( json?.PropertyT("cloudAccountState"), out var __jsonCloudAccountState) ? (string)__jsonCloudAccountState : (string)_cloudAccountState;} + {_termUnit = If( json?.PropertyT("termUnit"), out var __jsonTermUnit) ? (string)__jsonTermUnit : (string)_termUnit;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._saasSubscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._saasSubscriptionId.ToString()) : null, "saasSubscriptionId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._cloudAccountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloudAccountId.ToString()) : null, "cloudAccountId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._cloudAccountState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._cloudAccountState.ToString()) : null, "cloudAccountState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._termUnit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._termUnit.ToString()) : null, "termUnit" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._productCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._productCode.ToString()) : null, "productCode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._intent)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._intent.ToString()) : null, "intent" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.PowerShell.cs new file mode 100644 index 000000000000..a434ce934169 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.PowerShell.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The type used for update operations of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdateTypeConverter))] + public partial class OracleSubscriptionUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Intent, global::System.Convert.ToString); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).ProductCode, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).Intent, global::System.Convert.ToString); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal)this).ProductCode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The type used for update operations of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdateTypeConverter))] + public partial interface IOracleSubscriptionUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.TypeConverter.cs new file mode 100644 index 000000000000..3fee1ded7984 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.cs new file mode 100644 index 000000000000..9b7b8d0b3978 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.cs @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the OracleSubscription. + public partial class OracleSubscriptionUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal + { + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Intent { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)Property).Intent; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)Property).Intent = value ?? null; } + + /// Internal Acessors for Plan + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal.Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanUpdate()); set { {_plan = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate _plan; + + /// Details of the resource plan. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanUpdate()); set => this._plan = value; } + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Name = value ?? null; } + + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Product = value ?? null; } + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanPromotionCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).PromotionCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).PromotionCode = value ?? null; } + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Publisher = value ?? null; } + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PlanVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)Plan).Version = value ?? null; } + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProductCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)Property).ProductCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)Property).ProductCode = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties _property; + + /// The updatable properties of the OracleSubscription. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public OracleSubscriptionUpdate() + { + + } + } + /// The type used for update operations of the OracleSubscription. + public partial interface IOracleSubscriptionUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string PlanName { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string PlanVersion { get; set; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + + } + /// The type used for update operations of the OracleSubscription. + internal partial interface IOracleSubscriptionUpdateInternal + + { + /// Intent for the update operation + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// Details of the resource plan. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate Plan { get; set; } + /// A user defined name of the 3rd Party Artifact that is being procured. + string PlanName { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + string PlanVersion { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + /// The updatable properties of the OracleSubscription. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.json.cs new file mode 100644 index 000000000000..a5d024378bdd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The type used for update operations of the OracleSubscription. + public partial class OracleSubscriptionUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OracleSubscriptionUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_plan = If( json?.PropertyT("plan"), out var __jsonPlan) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PlanUpdate.FromJson(__jsonPlan) : _plan;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionUpdateProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._plan ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._plan.ToJson(null,serializationMode) : null, "plan" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..c55c3c450c2c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The updatable properties of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdatePropertiesTypeConverter))] + public partial class OracleSubscriptionUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).Intent, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).Intent = (string) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal)this).Intent, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The updatable properties of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdatePropertiesTypeConverter))] + public partial interface IOracleSubscriptionUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..ca3f0701976d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.cs new file mode 100644 index 000000000000..0fe619f29f44 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the OracleSubscription. + public partial class OracleSubscriptionUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdatePropertiesInternal + { + + /// Backing field for property. + private string _intent; + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Intent { get => this._intent; set => this._intent = value; } + + /// Backing field for property. + private string _productCode; + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProductCode { get => this._productCode; set => this._productCode = value; } + + /// Creates an new instance. + public OracleSubscriptionUpdateProperties() + { + + } + } + /// The updatable properties of the OracleSubscription. + public partial interface IOracleSubscriptionUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = false, + Create = false, + Update = true, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + + } + /// The updatable properties of the OracleSubscription. + internal partial interface IOracleSubscriptionUpdatePropertiesInternal + + { + /// Intent for the update operation + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Retain", "Reset")] + string Intent { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.json.cs new file mode 100644 index 000000000000..780820ee915e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/OracleSubscriptionUpdateProperties.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The updatable properties of the OracleSubscription. + public partial class OracleSubscriptionUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new OracleSubscriptionUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._productCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._productCode.ToString()) : null, "productCode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate)) + { + AddIf( null != (((object)this._intent)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._intent.ToString()) : null, "intent" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.PowerShell.cs new file mode 100644 index 000000000000..5ff3b057208f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// PeerDb Details + [System.ComponentModel.TypeConverter(typeof(PeerDbDetailsTypeConverter))] + public partial class PeerDbDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PeerDbDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PeerDbDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PeerDbDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetailsInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetailsInternal)this).PeerDbId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PeerDbDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetailsInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetailsInternal)this).PeerDbId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// PeerDb Details + [System.ComponentModel.TypeConverter(typeof(PeerDbDetailsTypeConverter))] + public partial interface IPeerDbDetails + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.TypeConverter.cs new file mode 100644 index 000000000000..aed05286bdd2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PeerDbDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PeerDbDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PeerDbDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PeerDbDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.cs new file mode 100644 index 000000000000..377ee5e49e99 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// PeerDb Details + public partial class PeerDbDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetailsInternal + { + + /// Backing field for property. + private string _peerDbId; + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PeerDbId { get => this._peerDbId; set => this._peerDbId = value; } + + /// Creates an new instance. + public PeerDbDetails() + { + + } + } + /// PeerDb Details + public partial interface IPeerDbDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + + } + /// PeerDb Details + internal partial interface IPeerDbDetailsInternal + + { + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + string PeerDbId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.json.cs new file mode 100644 index 000000000000..f0c184c40832 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PeerDbDetails.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// PeerDb Details + public partial class PeerDbDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new PeerDbDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal PeerDbDetails(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_peerDbId = If( json?.PropertyT("peerDbId"), out var __jsonPeerDbId) ? (string)__jsonPeerDbId : (string)_peerDbId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._peerDbId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._peerDbId.ToString()) : null, "peerDbId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.PowerShell.cs new file mode 100644 index 000000000000..e2cbdc081206 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Plan for the resource. + [System.ComponentModel.TypeConverter(typeof(PlanTypeConverter))] + public partial class Plan + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Plan(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Plan(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Plan(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Plan(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Plan for the resource. + [System.ComponentModel.TypeConverter(typeof(PlanTypeConverter))] + public partial interface IPlan + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.TypeConverter.cs new file mode 100644 index 000000000000..ac85ca2743ee --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PlanTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Plan.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Plan.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Plan.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.cs new file mode 100644 index 000000000000..ffd891303822 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Plan for the resource. + public partial class Plan : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanInternal + { + + /// Backing field for property. + private string _name; + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _product; + + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Product { get => this._product; set => this._product = value; } + + /// Backing field for property. + private string _promotionCode; + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PromotionCode { get => this._promotionCode; set => this._promotionCode = value; } + + /// Backing field for property. + private string _publisher; + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Publisher { get => this._publisher; set => this._publisher = value; } + + /// Backing field for property. + private string _version; + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public Plan() + { + + } + } + /// Plan for the resource. + public partial interface IPlan : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string Publisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// Plan for the resource. + internal partial interface IPlanInternal + + { + /// A user defined name of the 3rd Party Artifact that is being procured. + string Name { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string Publisher { get; set; } + /// The version of the desired product/artifact. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.json.cs new file mode 100644 index 000000000000..1c57812f2dd4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Plan.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Plan for the resource. + public partial class Plan + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlan FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new Plan(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal Plan(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_publisher = If( json?.PropertyT("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)_publisher;} + {_product = If( json?.PropertyT("product"), out var __jsonProduct) ? (string)__jsonProduct : (string)_product;} + {_promotionCode = If( json?.PropertyT("promotionCode"), out var __jsonPromotionCode) ? (string)__jsonPromotionCode : (string)_promotionCode;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._publisher)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._publisher.ToString()) : null, "publisher" ,container.Add ); + AddIf( null != (((object)this._product)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._product.ToString()) : null, "product" ,container.Add ); + AddIf( null != (((object)this._promotionCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._promotionCode.ToString()) : null, "promotionCode" ,container.Add ); + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.PowerShell.cs new file mode 100644 index 000000000000..1ea36b60ce9a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// ResourcePlanTypeUpdate model definition + [System.ComponentModel.TypeConverter(typeof(PlanUpdateTypeConverter))] + public partial class PlanUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PlanUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PlanUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PlanUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PlanUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// ResourcePlanTypeUpdate model definition + [System.ComponentModel.TypeConverter(typeof(PlanUpdateTypeConverter))] + public partial interface IPlanUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.TypeConverter.cs new file mode 100644 index 000000000000..94d64b542a2b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PlanUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PlanUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PlanUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PlanUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.cs new file mode 100644 index 000000000000..3cfec95c7e35 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// ResourcePlanTypeUpdate model definition + public partial class PlanUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdateInternal + { + + /// Backing field for property. + private string _name; + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _product; + + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Product { get => this._product; set => this._product = value; } + + /// Backing field for property. + private string _promotionCode; + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PromotionCode { get => this._promotionCode; set => this._promotionCode = value; } + + /// Backing field for property. + private string _publisher; + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Publisher { get => this._publisher; set => this._publisher = value; } + + /// Backing field for property. + private string _version; + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public PlanUpdate() + { + + } + } + /// ResourcePlanTypeUpdate model definition + public partial interface IPlanUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string Publisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// ResourcePlanTypeUpdate model definition + internal partial interface IPlanUpdateInternal + + { + /// A user defined name of the 3rd Party Artifact that is being procured. + string Name { get; set; } + /// + /// The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at + /// the time of Data Market onboarding. + /// + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string Publisher { get; set; } + /// The version of the desired product/artifact. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.json.cs new file mode 100644 index 000000000000..31c34bf83605 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PlanUpdate.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// ResourcePlanTypeUpdate model definition + public partial class PlanUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPlanUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new PlanUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal PlanUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_publisher = If( json?.PropertyT("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)_publisher;} + {_product = If( json?.PropertyT("product"), out var __jsonProduct) ? (string)__jsonProduct : (string)_product;} + {_promotionCode = If( json?.PropertyT("promotionCode"), out var __jsonPromotionCode) ? (string)__jsonPromotionCode : (string)_promotionCode;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)_version;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._publisher)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._publisher.ToString()) : null, "publisher" ,container.Add ); + AddIf( null != (((object)this._product)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._product.ToString()) : null, "product" ,container.Add ); + AddIf( null != (((object)this._promotionCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._promotionCode.ToString()) : null, "promotionCode" ,container.Add ); + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.PowerShell.cs new file mode 100644 index 000000000000..4477d1c2bc5f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Port Range to specify particular destination ports for TCP rules. + [System.ComponentModel.TypeConverter(typeof(PortRangeTypeConverter))] + public partial class PortRange + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PortRange(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PortRange(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PortRange(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Min")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Min = (int) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Max")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Max = (int) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PortRange(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Min")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Min = (int) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Max")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Max = (int) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Port Range to specify particular destination ports for TCP rules. + [System.ComponentModel.TypeConverter(typeof(PortRangeTypeConverter))] + public partial interface IPortRange + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.TypeConverter.cs new file mode 100644 index 000000000000..06421a2c768c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PortRangeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PortRange.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PortRange.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PortRange.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.cs new file mode 100644 index 000000000000..ef73fb35f739 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Port Range to specify particular destination ports for TCP rules. + public partial class PortRange : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRangeInternal + { + + /// Backing field for property. + private int _max; + + /// + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both + /// the min and max to the same value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int Max { get => this._max; set => this._max = value; } + + /// Backing field for property. + private int _min; + + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public int Min { get => this._min; set => this._min = value; } + + /// Creates an new instance. + public PortRange() + { + + } + } + /// Port Range to specify particular destination ports for TCP rules. + public partial interface IPortRange : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both + /// the min and max to the same value. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value.", + SerializedName = @"max", + PossibleTypes = new [] { typeof(int) })] + int Max { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The minimum port number, which must not be greater than the maximum port number.", + SerializedName = @"min", + PossibleTypes = new [] { typeof(int) })] + int Min { get; set; } + + } + /// Port Range to specify particular destination ports for TCP rules. + internal partial interface IPortRangeInternal + + { + /// + /// The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both + /// the min and max to the same value. + /// + int Max { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + int Min { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.json.cs new file mode 100644 index 000000000000..1808b618c1f9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PortRange.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Port Range to specify particular destination ports for TCP rules. + public partial class PortRange + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPortRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new PortRange(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal PortRange(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_min = If( json?.PropertyT("min"), out var __jsonMin) ? (int)__jsonMin : _min;} + {_max = If( json?.PropertyT("max"), out var __jsonMax) ? (int)__jsonMax : _max;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber(this._min), "min" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNumber(this._max), "max" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.PowerShell.cs new file mode 100644 index 000000000000..92a810d4261f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.PowerShell.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// PrivateIpAddress resource properties + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressPropertiesTypeConverter))] + public partial class PrivateIPAddressProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PrivateIPAddressProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PrivateIPAddressProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PrivateIPAddressProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostnameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).HostnameLabel = (string) content.GetValueForProperty("HostnameLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).HostnameLabel, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PrivateIPAddressProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostnameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).HostnameLabel = (string) content.GetValueForProperty("HostnameLabel",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).HostnameLabel, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// PrivateIpAddress resource properties + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressPropertiesTypeConverter))] + public partial interface IPrivateIPAddressProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.TypeConverter.cs new file mode 100644 index 000000000000..870b120c0d97 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PrivateIPAddressPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PrivateIPAddressProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PrivateIPAddressProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PrivateIPAddressProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.cs new file mode 100644 index 000000000000..62076b61df26 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// PrivateIpAddress resource properties + public partial class PrivateIPAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressPropertiesInternal + { + + /// Backing field for property. + private string _displayName; + + /// PrivateIpAddresses displayName + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _hostnameLabel; + + /// PrivateIpAddresses hostnameLabel + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string HostnameLabel { get => this._hostnameLabel; set => this._hostnameLabel = value; } + + /// Backing field for property. + private string _iPAddress; + + /// PrivateIpAddresses ipAddress + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string IPAddress { get => this._iPAddress; set => this._iPAddress = value; } + + /// Backing field for property. + private string _ocid; + + /// PrivateIpAddresses Id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// Backing field for property. + private string _subnetId; + + /// PrivateIpAddresses subnetId + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Creates an new instance. + public PrivateIPAddressProperties() + { + + } + } + /// PrivateIpAddress resource properties + public partial interface IPrivateIPAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// PrivateIpAddresses displayName + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"PrivateIpAddresses displayName", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// PrivateIpAddresses hostnameLabel + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"PrivateIpAddresses hostnameLabel", + SerializedName = @"hostnameLabel", + PossibleTypes = new [] { typeof(string) })] + string HostnameLabel { get; set; } + /// PrivateIpAddresses ipAddress + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"PrivateIpAddresses ipAddress", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + string IPAddress { get; set; } + /// PrivateIpAddresses Id + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"PrivateIpAddresses Id", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// PrivateIpAddresses subnetId + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"PrivateIpAddresses subnetId", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + + } + /// PrivateIpAddress resource properties + internal partial interface IPrivateIPAddressPropertiesInternal + + { + /// PrivateIpAddresses displayName + string DisplayName { get; set; } + /// PrivateIpAddresses hostnameLabel + string HostnameLabel { get; set; } + /// PrivateIpAddresses ipAddress + string IPAddress { get; set; } + /// PrivateIpAddresses Id + string Ocid { get; set; } + /// PrivateIpAddresses subnetId + string SubnetId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.json.cs new file mode 100644 index 000000000000..77e9f927e8de --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// PrivateIpAddress resource properties + public partial class PrivateIPAddressProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new PrivateIPAddressProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateIPAddressProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_hostnameLabel = If( json?.PropertyT("hostnameLabel"), out var __jsonHostnameLabel) ? (string)__jsonHostnameLabel : (string)_hostnameLabel;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_iPAddress = If( json?.PropertyT("ipAddress"), out var __jsonIPAddress) ? (string)__jsonIPAddress : (string)_iPAddress;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)_subnetId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._hostnameLabel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._hostnameLabel.ToString()) : null, "hostnameLabel" ,container.Add ); + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + AddIf( null != (((object)this._iPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._iPAddress.ToString()) : null, "ipAddress" ,container.Add ); + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.PowerShell.cs new file mode 100644 index 000000000000..f848e054bfd0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Private Ip Addresses filter + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressesFilterTypeConverter))] + public partial class PrivateIPAddressesFilter + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PrivateIPAddressesFilter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PrivateIPAddressesFilter(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PrivateIPAddressesFilter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).VnicId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PrivateIPAddressesFilter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal)this).VnicId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Private Ip Addresses filter + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressesFilterTypeConverter))] + public partial interface IPrivateIPAddressesFilter + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.TypeConverter.cs new file mode 100644 index 000000000000..46feeb60415c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PrivateIPAddressesFilterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PrivateIPAddressesFilter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PrivateIPAddressesFilter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PrivateIPAddressesFilter.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.cs new file mode 100644 index 000000000000..50c2887df47f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Private Ip Addresses filter + public partial class PrivateIPAddressesFilter : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilterInternal + { + + /// Backing field for property. + private string _subnetId; + + /// Subnet OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private string _vnicId; + + /// VCN OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string VnicId { get => this._vnicId; set => this._vnicId = value; } + + /// Creates an new instance. + public PrivateIPAddressesFilter() + { + + } + } + /// Private Ip Addresses filter + public partial interface IPrivateIPAddressesFilter : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Subnet OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Subnet OCID", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// VCN OCID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"VCN OCID", + SerializedName = @"vnicId", + PossibleTypes = new [] { typeof(string) })] + string VnicId { get; set; } + + } + /// Private Ip Addresses filter + internal partial interface IPrivateIPAddressesFilterInternal + + { + /// Subnet OCID + string SubnetId { get; set; } + /// VCN OCID + string VnicId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.json.cs new file mode 100644 index 000000000000..e9432a6c1852 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/PrivateIPAddressesFilter.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Private Ip Addresses filter + public partial class PrivateIPAddressesFilter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new PrivateIPAddressesFilter(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateIPAddressesFilter(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)_subnetId;} + {_vnicId = If( json?.PropertyT("vnicId"), out var __jsonVnicId) ? (string)__jsonVnicId : (string)_vnicId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AddIf( null != (((object)this._vnicId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._vnicId.ToString()) : null, "vnicId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.PowerShell.cs new file mode 100644 index 000000000000..f8ba93321779 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.PowerShell.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [System.ComponentModel.TypeConverter(typeof(ProfileTypeTypeConverter))] + public partial class ProfileType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProfileType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProfileType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProfileType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConsumerGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).ConsumerGroup = (string) content.GetValueForProperty("ConsumerGroup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).ConsumerGroup, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).HostFormat = (string) content.GetValueForProperty("HostFormat",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).HostFormat, global::System.Convert.ToString); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Protocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Protocol, global::System.Convert.ToString); + } + if (content.Contains("SessionMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SessionMode = (string) content.GetValueForProperty("SessionMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SessionMode, global::System.Convert.ToString); + } + if (content.Contains("SyntaxFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SyntaxFormat = (string) content.GetValueForProperty("SyntaxFormat",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SyntaxFormat, global::System.Convert.ToString); + } + if (content.Contains("TlsAuthentication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).TlsAuthentication = (string) content.GetValueForProperty("TlsAuthentication",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).TlsAuthentication, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProfileType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConsumerGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).ConsumerGroup = (string) content.GetValueForProperty("ConsumerGroup",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).ConsumerGroup, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).HostFormat = (string) content.GetValueForProperty("HostFormat",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).HostFormat, global::System.Convert.ToString); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Protocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Protocol, global::System.Convert.ToString); + } + if (content.Contains("SessionMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SessionMode = (string) content.GetValueForProperty("SessionMode",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SessionMode, global::System.Convert.ToString); + } + if (content.Contains("SyntaxFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SyntaxFormat = (string) content.GetValueForProperty("SyntaxFormat",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).SyntaxFormat, global::System.Convert.ToString); + } + if (content.Contains("TlsAuthentication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).TlsAuthentication = (string) content.GetValueForProperty("TlsAuthentication",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).TlsAuthentication, global::System.Convert.ToString); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + [System.ComponentModel.TypeConverter(typeof(ProfileTypeTypeConverter))] + public partial interface IProfileType + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.TypeConverter.cs new file mode 100644 index 000000000000..f1846c07a920 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfileTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProfileType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProfileType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProfileType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.cs new file mode 100644 index 000000000000..6178a65a980c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class ProfileType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileTypeInternal + { + + /// Backing field for property. + private string _consumerGroup; + + /// Consumer group used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ConsumerGroup { get => this._consumerGroup; set => this._consumerGroup = value; } + + /// Backing field for property. + private string _displayName; + + /// A user-friendly name for the connection. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _hostFormat; + + /// Host format used in connection string. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string HostFormat { get => this._hostFormat; set => this._hostFormat = value; } + + /// Backing field for property. + private bool? _isRegional; + + /// True for a regional connection string, applicable to cross-region DG only. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsRegional { get => this._isRegional; set => this._isRegional = value; } + + /// Backing field for property. + private string _protocol; + + /// Protocol used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Protocol { get => this._protocol; set => this._protocol = value; } + + /// Backing field for property. + private string _sessionMode; + + /// + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SessionMode { get => this._sessionMode; set => this._sessionMode = value; } + + /// Backing field for property. + private string _syntaxFormat; + + /// + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) + /// format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SyntaxFormat { get => this._syntaxFormat; set => this._syntaxFormat = value; } + + /// Backing field for property. + private string _tlsAuthentication; + + /// + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TlsAuthentication { get => this._tlsAuthentication; set => this._tlsAuthentication = value; } + + /// Backing field for property. + private string _value; + + /// Connection string value. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProfileType() + { + + } + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + public partial interface IProfileType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Consumer group used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Consumer group used by the connection.", + SerializedName = @"consumerGroup", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("High", "Medium", "Low", "Tp", "Tpurgent")] + string ConsumerGroup { get; set; } + /// A user-friendly name for the connection. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A user-friendly name for the connection.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Host format used in connection string. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Host format used in connection string.", + SerializedName = @"hostFormat", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Fqdn", "Ip")] + string HostFormat { get; set; } + /// True for a regional connection string, applicable to cross-region DG only. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"True for a regional connection string, applicable to cross-region DG only.", + SerializedName = @"isRegional", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRegional { get; set; } + /// Protocol used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Protocol used by the connection.", + SerializedName = @"protocol", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("TCP", "TCPS")] + string Protocol { get; set; } + /// + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the listener performs a direct hand-off of the session, or redirects the session.", + SerializedName = @"sessionMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Direct", "Redirect")] + string SessionMode { get; set; } + /// + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) + /// format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format.", + SerializedName = @"syntaxFormat", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Long", "Ezconnect", "Ezconnectplus")] + string SyntaxFormat { get; set; } + /// + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication.", + SerializedName = @"tlsAuthentication", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Server", "Mutual")] + string TlsAuthentication { get; set; } + /// Connection string value. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Connection string value.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + internal partial interface IProfileTypeInternal + + { + /// Consumer group used by the connection. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("High", "Medium", "Low", "Tp", "Tpurgent")] + string ConsumerGroup { get; set; } + /// A user-friendly name for the connection. + string DisplayName { get; set; } + /// Host format used in connection string. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Fqdn", "Ip")] + string HostFormat { get; set; } + /// True for a regional connection string, applicable to cross-region DG only. + bool? IsRegional { get; set; } + /// Protocol used by the connection. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("TCP", "TCPS")] + string Protocol { get; set; } + /// + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Direct", "Redirect")] + string SessionMode { get; set; } + /// + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) + /// format. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Long", "Ezconnect", "Ezconnectplus")] + string SyntaxFormat { get; set; } + /// + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Server", "Mutual")] + string TlsAuthentication { get; set; } + /// Connection string value. + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.json.cs new file mode 100644 index 000000000000..91a8688ba408 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProfileType.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class ProfileType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProfileType FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ProfileType(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ProfileType(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_consumerGroup = If( json?.PropertyT("consumerGroup"), out var __jsonConsumerGroup) ? (string)__jsonConsumerGroup : (string)_consumerGroup;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)_displayName;} + {_hostFormat = If( json?.PropertyT("hostFormat"), out var __jsonHostFormat) ? (string)__jsonHostFormat : (string)_hostFormat;} + {_isRegional = If( json?.PropertyT("isRegional"), out var __jsonIsRegional) ? (bool?)__jsonIsRegional : _isRegional;} + {_protocol = If( json?.PropertyT("protocol"), out var __jsonProtocol) ? (string)__jsonProtocol : (string)_protocol;} + {_sessionMode = If( json?.PropertyT("sessionMode"), out var __jsonSessionMode) ? (string)__jsonSessionMode : (string)_sessionMode;} + {_syntaxFormat = If( json?.PropertyT("syntaxFormat"), out var __jsonSyntaxFormat) ? (string)__jsonSyntaxFormat : (string)_syntaxFormat;} + {_tlsAuthentication = If( json?.PropertyT("tlsAuthentication"), out var __jsonTlsAuthentication) ? (string)__jsonTlsAuthentication : (string)_tlsAuthentication;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)_value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._consumerGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._consumerGroup.ToString()) : null, "consumerGroup" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._hostFormat)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._hostFormat.ToString()) : null, "hostFormat" ,container.Add ); + AddIf( null != this._isRegional ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isRegional) : null, "isRegional" ,container.Add ); + AddIf( null != (((object)this._protocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._protocol.ToString()) : null, "protocol" ,container.Add ); + AddIf( null != (((object)this._sessionMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._sessionMode.ToString()) : null, "sessionMode" ,container.Add ); + AddIf( null != (((object)this._syntaxFormat)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._syntaxFormat.ToString()) : null, "syntaxFormat" ,container.Add ); + AddIf( null != (((object)this._tlsAuthentication)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._tlsAuthentication.ToString()) : null, "tlsAuthentication" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..cc193f604517 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..8918c7f73206 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.cs new file mode 100644 index 000000000000..f0e634e37ba3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.json.cs new file mode 100644 index 000000000000..9f41a242e42f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ProxyResource.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.PowerShell.cs new file mode 100644 index 000000000000..9bfce78c59b4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.PowerShell.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.TypeConverter.cs new file mode 100644 index 000000000000..026e550644e1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.cs new file mode 100644 index 000000000000..917650889d5c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).CreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)SystemData).LastModifiedByType = value ?? null; } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.json.cs new file mode 100644 index 000000000000..bc1e834df495 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/Resource.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.PowerShell.cs new file mode 100644 index 000000000000..65b69f5b43dd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Details to restore an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(RestoreAutonomousDatabaseDetailsTypeConverter))] + public partial class RestoreAutonomousDatabaseDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RestoreAutonomousDatabaseDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RestoreAutonomousDatabaseDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RestoreAutonomousDatabaseDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Timestamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp = (global::System.DateTime) content.GetValueForProperty("Timestamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RestoreAutonomousDatabaseDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Timestamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp = (global::System.DateTime) content.GetValueForProperty("Timestamp",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Details to restore an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(RestoreAutonomousDatabaseDetailsTypeConverter))] + public partial interface IRestoreAutonomousDatabaseDetails + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.TypeConverter.cs new file mode 100644 index 000000000000..f31329a8d823 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RestoreAutonomousDatabaseDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RestoreAutonomousDatabaseDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RestoreAutonomousDatabaseDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RestoreAutonomousDatabaseDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.cs new file mode 100644 index 000000000000..24373eb53cd8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Details to restore an Oracle Autonomous Database. + public partial class RestoreAutonomousDatabaseDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetailsInternal + { + + /// Backing field for property. + private global::System.DateTime _timestamp; + + /// The time to restore the database to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime Timestamp { get => this._timestamp; set => this._timestamp = value; } + + /// Creates an new instance. + public RestoreAutonomousDatabaseDetails() + { + + } + } + /// Details to restore an Oracle Autonomous Database. + public partial interface IRestoreAutonomousDatabaseDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The time to restore the database to. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The time to restore the database to.", + SerializedName = @"timestamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime Timestamp { get; set; } + + } + /// Details to restore an Oracle Autonomous Database. + internal partial interface IRestoreAutonomousDatabaseDetailsInternal + + { + /// The time to restore the database to. + global::System.DateTime Timestamp { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.json.cs new file mode 100644 index 000000000000..eee6f1d182c3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/RestoreAutonomousDatabaseDetails.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Details to restore an Oracle Autonomous Database. + public partial class RestoreAutonomousDatabaseDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new RestoreAutonomousDatabaseDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal RestoreAutonomousDatabaseDetails(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_timestamp = If( json?.PropertyT("timestamp"), out var __jsonTimestamp) ? global::System.DateTime.TryParse((string)__jsonTimestamp, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimestampValue) ? __jsonTimestampValue : _timestamp : _timestamp;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timestamp.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "timestamp" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.PowerShell.cs new file mode 100644 index 000000000000..9afc457f79a5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.PowerShell.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// SaaS Subscription Details model + [System.ComponentModel.TypeConverter(typeof(SaasSubscriptionDetailsTypeConverter))] + public partial class SaasSubscriptionDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SaasSubscriptionDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SaasSubscriptionDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SaasSubscriptionDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SubscriptionName = (string) content.GetValueForProperty("SubscriptionName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SubscriptionName, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("OfferId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).OfferId = (string) content.GetValueForProperty("OfferId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).OfferId, global::System.Convert.ToString); + } + if (content.Contains("PlanId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PlanId, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus = (string) content.GetValueForProperty("SaasSubscriptionStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus, global::System.Convert.ToString); + } + if (content.Contains("PublisherId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PublisherId = (string) content.GetValueForProperty("PublisherId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PublisherId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserEmailId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId = (string) content.GetValueForProperty("PurchaserEmailId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId = (string) content.GetValueForProperty("PurchaserTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("IsAutoRenew")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsAutoRenew = (bool?) content.GetValueForProperty("IsAutoRenew",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsAutoRenew, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTrial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsFreeTrial = (bool?) content.GetValueForProperty("IsFreeTrial",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsFreeTrial, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SaasSubscriptionDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SubscriptionName = (string) content.GetValueForProperty("SubscriptionName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SubscriptionName, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("OfferId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).OfferId = (string) content.GetValueForProperty("OfferId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).OfferId, global::System.Convert.ToString); + } + if (content.Contains("PlanId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PlanId, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus = (string) content.GetValueForProperty("SaasSubscriptionStatus",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus, global::System.Convert.ToString); + } + if (content.Contains("PublisherId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PublisherId = (string) content.GetValueForProperty("PublisherId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PublisherId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserEmailId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId = (string) content.GetValueForProperty("PurchaserEmailId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId = (string) content.GetValueForProperty("PurchaserTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("IsAutoRenew")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsAutoRenew = (bool?) content.GetValueForProperty("IsAutoRenew",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsAutoRenew, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTrial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsFreeTrial = (bool?) content.GetValueForProperty("IsFreeTrial",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal)this).IsFreeTrial, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// SaaS Subscription Details model + [System.ComponentModel.TypeConverter(typeof(SaasSubscriptionDetailsTypeConverter))] + public partial interface ISaasSubscriptionDetails + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.TypeConverter.cs new file mode 100644 index 000000000000..3ddc911f8925 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SaasSubscriptionDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SaasSubscriptionDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SaasSubscriptionDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SaasSubscriptionDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.cs new file mode 100644 index 000000000000..61a2ba25464d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.cs @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// SaaS Subscription Details model + public partial class SaasSubscriptionDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal + { + + /// Backing field for property. + private string _id; + + /// Purchased SaaS subscription ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private bool? _isAutoRenew; + + /// AutoRenew flag + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsAutoRenew { get => this._isAutoRenew; } + + /// Backing field for property. + private bool? _isFreeTrial; + + /// FreeTrial flag + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsFreeTrial { get => this._isFreeTrial; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for IsAutoRenew + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.IsAutoRenew { get => this._isAutoRenew; set { {_isAutoRenew = value;} } } + + /// Internal Acessors for IsFreeTrial + bool? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.IsFreeTrial { get => this._isFreeTrial; set { {_isFreeTrial = value;} } } + + /// Internal Acessors for OfferId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.OfferId { get => this._offerId; set { {_offerId = value;} } } + + /// Internal Acessors for PlanId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.PlanId { get => this._planId; set { {_planId = value;} } } + + /// Internal Acessors for PublisherId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.PublisherId { get => this._publisherId; set { {_publisherId = value;} } } + + /// Internal Acessors for PurchaserEmailId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.PurchaserEmailId { get => this._purchaserEmailId; set { {_purchaserEmailId = value;} } } + + /// Internal Acessors for PurchaserTenantId + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.PurchaserTenantId { get => this._purchaserTenantId; set { {_purchaserTenantId = value;} } } + + /// Internal Acessors for SaasSubscriptionStatus + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.SaasSubscriptionStatus { get => this._saasSubscriptionStatus; set { {_saasSubscriptionStatus = value;} } } + + /// Internal Acessors for SubscriptionName + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.SubscriptionName { get => this._subscriptionName; set { {_subscriptionName = value;} } } + + /// Internal Acessors for TermUnit + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.TermUnit { get => this._termUnit; set { {_termUnit = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetailsInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Backing field for property. + private string _offerId; + + /// Purchased offer ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string OfferId { get => this._offerId; } + + /// Backing field for property. + private string _planId; + + /// Purchased offer's plan ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PlanId { get => this._planId; } + + /// Backing field for property. + private string _publisherId; + + /// Publisher ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PublisherId { get => this._publisherId; } + + /// Backing field for property. + private string _purchaserEmailId; + + /// Purchaser Email ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PurchaserEmailId { get => this._purchaserEmailId; } + + /// Backing field for property. + private string _purchaserTenantId; + + /// Purchaser Tenant ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string PurchaserTenantId { get => this._purchaserTenantId; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// Backing field for property. + private string _saasSubscriptionStatus; + + /// Indicates the status of the Subscription. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SaasSubscriptionStatus { get => this._saasSubscriptionStatus; } + + /// Backing field for property. + private string _subscriptionName; + + /// SaaS subscription name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SubscriptionName { get => this._subscriptionName; } + + /// Backing field for property. + private string _termUnit; + + /// Purchase Term Unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string TermUnit { get => this._termUnit; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// Creation Date and Time + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Creates an new instance. + public SaasSubscriptionDetails() + { + + } + } + /// SaaS Subscription Details model + public partial interface ISaasSubscriptionDetails : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Purchased SaaS subscription ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Purchased SaaS subscription ID", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// AutoRenew flag + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"AutoRenew flag", + SerializedName = @"isAutoRenew", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoRenew { get; } + /// FreeTrial flag + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"FreeTrial flag", + SerializedName = @"isFreeTrial", + PossibleTypes = new [] { typeof(bool) })] + bool? IsFreeTrial { get; } + /// Purchased offer ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Purchased offer ID", + SerializedName = @"offerId", + PossibleTypes = new [] { typeof(string) })] + string OfferId { get; } + /// Purchased offer's plan ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Purchased offer's plan ID", + SerializedName = @"planId", + PossibleTypes = new [] { typeof(string) })] + string PlanId { get; } + /// Publisher ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Publisher ID", + SerializedName = @"publisherId", + PossibleTypes = new [] { typeof(string) })] + string PublisherId { get; } + /// Purchaser Email ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Purchaser Email ID", + SerializedName = @"purchaserEmailId", + PossibleTypes = new [] { typeof(string) })] + string PurchaserEmailId { get; } + /// Purchaser Tenant ID + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Purchaser Tenant ID", + SerializedName = @"purchaserTenantId", + PossibleTypes = new [] { typeof(string) })] + string PurchaserTenantId { get; } + /// Indicates the status of the Subscription. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Indicates the status of the Subscription.", + SerializedName = @"saasSubscriptionStatus", + PossibleTypes = new [] { typeof(string) })] + string SaasSubscriptionStatus { get; } + /// SaaS subscription name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"SaaS subscription name", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionName { get; } + /// Purchase Term Unit + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Purchase Term Unit", + SerializedName = @"termUnit", + PossibleTypes = new [] { typeof(string) })] + string TermUnit { get; } + /// Creation Date and Time + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Creation Date and Time", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + + } + /// SaaS Subscription Details model + internal partial interface ISaasSubscriptionDetailsInternal + + { + /// Purchased SaaS subscription ID + string Id { get; set; } + /// AutoRenew flag + bool? IsAutoRenew { get; set; } + /// FreeTrial flag + bool? IsFreeTrial { get; set; } + /// Purchased offer ID + string OfferId { get; set; } + /// Purchased offer's plan ID + string PlanId { get; set; } + /// Publisher ID + string PublisherId { get; set; } + /// Purchaser Email ID + string PurchaserEmailId { get; set; } + /// Purchaser Tenant ID + string PurchaserTenantId { get; set; } + /// Indicates the status of the Subscription. + string SaasSubscriptionStatus { get; set; } + /// SaaS subscription name + string SubscriptionName { get; set; } + /// Purchase Term Unit + string TermUnit { get; set; } + /// Creation Date and Time + global::System.DateTime? TimeCreated { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.json.cs new file mode 100644 index 000000000000..fc0d4c9e3642 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SaasSubscriptionDetails.json.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// SaaS Subscription Details model + public partial class SaasSubscriptionDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISaasSubscriptionDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new SaasSubscriptionDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal SaasSubscriptionDetails(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} + {_subscriptionName = If( json?.PropertyT("subscriptionName"), out var __jsonSubscriptionName) ? (string)__jsonSubscriptionName : (string)_subscriptionName;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : _timeCreated : _timeCreated;} + {_offerId = If( json?.PropertyT("offerId"), out var __jsonOfferId) ? (string)__jsonOfferId : (string)_offerId;} + {_planId = If( json?.PropertyT("planId"), out var __jsonPlanId) ? (string)__jsonPlanId : (string)_planId;} + {_saasSubscriptionStatus = If( json?.PropertyT("saasSubscriptionStatus"), out var __jsonSaasSubscriptionStatus) ? (string)__jsonSaasSubscriptionStatus : (string)_saasSubscriptionStatus;} + {_publisherId = If( json?.PropertyT("publisherId"), out var __jsonPublisherId) ? (string)__jsonPublisherId : (string)_publisherId;} + {_purchaserEmailId = If( json?.PropertyT("purchaserEmailId"), out var __jsonPurchaserEmailId) ? (string)__jsonPurchaserEmailId : (string)_purchaserEmailId;} + {_purchaserTenantId = If( json?.PropertyT("purchaserTenantId"), out var __jsonPurchaserTenantId) ? (string)__jsonPurchaserTenantId : (string)_purchaserTenantId;} + {_termUnit = If( json?.PropertyT("termUnit"), out var __jsonTermUnit) ? (string)__jsonTermUnit : (string)_termUnit;} + {_isAutoRenew = If( json?.PropertyT("isAutoRenew"), out var __jsonIsAutoRenew) ? (bool?)__jsonIsAutoRenew : _isAutoRenew;} + {_isFreeTrial = If( json?.PropertyT("isFreeTrial"), out var __jsonIsFreeTrial) ? (bool?)__jsonIsFreeTrial : _isFreeTrial;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._subscriptionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._subscriptionName.ToString()) : null, "subscriptionName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._offerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._offerId.ToString()) : null, "offerId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._planId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._planId.ToString()) : null, "planId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._saasSubscriptionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._saasSubscriptionStatus.ToString()) : null, "saasSubscriptionStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._publisherId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._publisherId.ToString()) : null, "publisherId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._purchaserEmailId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._purchaserEmailId.ToString()) : null, "purchaserEmailId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._purchaserTenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._purchaserTenantId.ToString()) : null, "purchaserTenantId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._termUnit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._termUnit.ToString()) : null, "termUnit" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isAutoRenew ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isAutoRenew) : null, "isAutoRenew" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._isFreeTrial ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isFreeTrial) : null, "isFreeTrial" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.PowerShell.cs new file mode 100644 index 000000000000..01de1fe7a9ee --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeTypeConverter))] + public partial class ScheduledOperationsType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScheduledOperationsType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScheduledOperationsType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScheduledOperationsType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ScheduledOperationsType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeTypeConverter))] + public partial interface IScheduledOperationsType + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.TypeConverter.cs new file mode 100644 index 000000000000..38e83dcdde57 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduledOperationsTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ScheduledOperationsType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ScheduledOperationsType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ScheduledOperationsType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.cs new file mode 100644 index 000000000000..8d83245a8820 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek _dayOfWeek; + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeek()); set => this._dayOfWeek = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekInternal)DayOfWeek).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekInternal)DayOfWeek).Name = value ; } + + /// Internal Acessors for DayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeInternal.DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeek()); set { {_dayOfWeek = value;} } } + + /// Backing field for property. + private string _scheduledStartTime; + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ScheduledStartTime { get => this._scheduledStartTime; set => this._scheduledStartTime = value; } + + /// Backing field for property. + private string _scheduledStopTime; + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ScheduledStopTime { get => this._scheduledStopTime; set => this._scheduledStopTime = value; } + + /// Creates an new instance. + public ScheduledOperationsType() + { + + } + } + /// The list of scheduled operations. + public partial interface IScheduledOperationsType : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStopTime { get; set; } + + } + /// The list of scheduled operations. + internal partial interface IScheduledOperationsTypeInternal + + { + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek DayOfWeek { get; set; } + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledStopTime { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.json.cs new file mode 100644 index 000000000000..c11af25e0860 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsType.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsType FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ScheduledOperationsType(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ScheduledOperationsType(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dayOfWeek = If( json?.PropertyT("dayOfWeek"), out var __jsonDayOfWeek) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeek.FromJson(__jsonDayOfWeek) : _dayOfWeek;} + {_scheduledStartTime = If( json?.PropertyT("scheduledStartTime"), out var __jsonScheduledStartTime) ? (string)__jsonScheduledStartTime : (string)_scheduledStartTime;} + {_scheduledStopTime = If( json?.PropertyT("scheduledStopTime"), out var __jsonScheduledStopTime) ? (string)__jsonScheduledStopTime : (string)_scheduledStopTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dayOfWeek ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._dayOfWeek.ToJson(null,serializationMode) : null, "dayOfWeek" ,container.Add ); + AddIf( null != (((object)this._scheduledStartTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._scheduledStartTime.ToString()) : null, "scheduledStartTime" ,container.Add ); + AddIf( null != (((object)this._scheduledStopTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._scheduledStopTime.ToString()) : null, "scheduledStopTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.PowerShell.cs new file mode 100644 index 000000000000..630104069554 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeUpdateTypeConverter))] + public partial class ScheduledOperationsTypeUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScheduledOperationsTypeUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScheduledOperationsTypeUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScheduledOperationsTypeUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ScheduledOperationsTypeUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName = (string) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeUpdateTypeConverter))] + public partial interface IScheduledOperationsTypeUpdate + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.TypeConverter.cs new file mode 100644 index 000000000000..d3d846d6d632 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduledOperationsTypeUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ScheduledOperationsTypeUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ScheduledOperationsTypeUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ScheduledOperationsTypeUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.cs new file mode 100644 index 000000000000..f1ca92c27154 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsTypeUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate _dayOfWeek; + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdate()); set => this._dayOfWeek = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdateInternal)DayOfWeek).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdateInternal)DayOfWeek).Name = value ?? null; } + + /// Internal Acessors for DayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdateInternal.DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdate()); set { {_dayOfWeek = value;} } } + + /// Backing field for property. + private string _scheduledStartTime; + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ScheduledStartTime { get => this._scheduledStartTime; set => this._scheduledStartTime = value; } + + /// Backing field for property. + private string _scheduledStopTime; + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ScheduledStopTime { get => this._scheduledStopTime; set => this._scheduledStopTime = value; } + + /// Creates an new instance. + public ScheduledOperationsTypeUpdate() + { + + } + } + /// The list of scheduled operations. + public partial interface IScheduledOperationsTypeUpdate : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStopTime { get; set; } + + } + /// The list of scheduled operations. + internal partial interface IScheduledOperationsTypeUpdateInternal + + { + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeekUpdate DayOfWeek { get; set; } + /// Name of the day of the week. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + string DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledStopTime { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.json.cs new file mode 100644 index 000000000000..a6760825f927 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ScheduledOperationsTypeUpdate.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsTypeUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IScheduledOperationsTypeUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ScheduledOperationsTypeUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ScheduledOperationsTypeUpdate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dayOfWeek = If( json?.PropertyT("dayOfWeek"), out var __jsonDayOfWeek) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DayOfWeekUpdate.FromJson(__jsonDayOfWeek) : _dayOfWeek;} + {_scheduledStartTime = If( json?.PropertyT("scheduledStartTime"), out var __jsonScheduledStartTime) ? (string)__jsonScheduledStartTime : (string)_scheduledStartTime;} + {_scheduledStopTime = If( json?.PropertyT("scheduledStopTime"), out var __jsonScheduledStopTime) ? (string)__jsonScheduledStopTime : (string)_scheduledStopTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dayOfWeek ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._dayOfWeek.ToJson(null,serializationMode) : null, "dayOfWeek" ,container.Add ); + AddIf( null != (((object)this._scheduledStartTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._scheduledStartTime.ToString()) : null, "scheduledStartTime" ,container.Add ); + AddIf( null != (((object)this._scheduledStopTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._scheduledStopTime.ToString()) : null, "scheduledStopTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.PowerShell.cs new file mode 100644 index 000000000000..8ce6337559f1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.PowerShell.cs @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedByType = (string) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedByType, global::System.Convert.ToString); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedByType = (string) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..d95e7381f4db --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.cs new file mode 100644 index 000000000000..c6042909ddb2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private string _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private string _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("User", "Application", "ManagedIdentity", "Key")] + string LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.json.cs new file mode 100644 index 000000000000..5803f6087255 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemData.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)_createdBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)_createdByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : _createdAt : _createdAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)_lastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)_lastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : _lastModifiedAt : _lastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.PowerShell.cs new file mode 100644 index 000000000000..81821206a682 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.PowerShell.cs @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// SystemVersion resource Definition + [System.ComponentModel.TypeConverter(typeof(SystemVersionTypeConverter))] + public partial class SystemVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PropertiesSystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).PropertiesSystemVersion = (string) content.GetValueForProperty("PropertiesSystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).PropertiesSystemVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PropertiesSystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).PropertiesSystemVersion = (string) content.GetValueForProperty("PropertiesSystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal)this).PropertiesSystemVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// SystemVersion resource Definition + [System.ComponentModel.TypeConverter(typeof(SystemVersionTypeConverter))] + public partial interface ISystemVersion + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.TypeConverter.cs new file mode 100644 index 000000000000..247a7ba29dd6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.cs new file mode 100644 index 000000000000..0b6396515026 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// SystemVersion resource Definition + public partial class SystemVersion : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// Internal Acessors for PropertiesSystemVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal.PropertiesSystemVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal)Property).SystemVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal)Property).SystemVersion = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionProperties()); set { {_property = value;} } } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string PropertiesSystemVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal)Property).SystemVersion; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionProperties()); set => this._property = value; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Creates an new instance. + public SystemVersion() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + } + /// SystemVersion resource Definition + public partial interface ISystemVersion : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A valid Oracle System Version", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string PropertiesSystemVersion { get; } + + } + /// SystemVersion resource Definition + internal partial interface ISystemVersionInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// A valid Oracle System Version + string PropertiesSystemVersion { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.json.cs new file mode 100644 index 000000000000..65dcfccf5b51 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersion.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// SystemVersion resource Definition + public partial class SystemVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new SystemVersion(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersion(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..6758e860fad9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a SystemVersion list operation. + [System.ComponentModel.TypeConverter(typeof(SystemVersionListResultTypeConverter))] + public partial class SystemVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// The response of a SystemVersion list operation. + [System.ComponentModel.TypeConverter(typeof(SystemVersionListResultTypeConverter))] + public partial interface ISystemVersionListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..22ea3447ad2d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.cs new file mode 100644 index 000000000000..9b3769cb2856 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a SystemVersion list operation. + public partial class SystemVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The SystemVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public SystemVersionListResult() + { + + } + } + /// The response of a SystemVersion list operation. + public partial interface ISystemVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The SystemVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The SystemVersion items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a SystemVersion list operation. + internal partial interface ISystemVersionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The SystemVersion items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.json.cs new file mode 100644 index 000000000000..b1ee05d15484 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a SystemVersion list operation. + public partial class SystemVersionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new SystemVersionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersion) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersion.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..3f0b87419f27 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.PowerShell.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// System Version Resource model + [System.ComponentModel.TypeConverter(typeof(SystemVersionPropertiesTypeConverter))] + public partial class SystemVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// System Version Resource model + [System.ComponentModel.TypeConverter(typeof(SystemVersionPropertiesTypeConverter))] + public partial interface ISystemVersionProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.TypeConverter.cs new file mode 100644 index 000000000000..6dbd79bd82a6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.cs new file mode 100644 index 000000000000..a1d96c292a2d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// System Version Resource model + public partial class SystemVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal + { + + /// Internal Acessors for SystemVersion + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionPropertiesInternal.SystemVersion { get => this._systemVersion; set { {_systemVersion = value;} } } + + /// Backing field for property. + private string _systemVersion; + + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string SystemVersion { get => this._systemVersion; } + + /// Creates an new instance. + public SystemVersionProperties() + { + + } + } + /// System Version Resource model + public partial interface ISystemVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A valid Oracle System Version", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; } + + } + /// System Version Resource model + internal partial interface ISystemVersionPropertiesInternal + + { + /// A valid Oracle System Version + string SystemVersion { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.json.cs new file mode 100644 index 000000000000..7fda9b5034a9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionProperties.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// System Version Resource model + public partial class SystemVersionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new SystemVersionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemVersion = If( json?.PropertyT("systemVersion"), out var __jsonSystemVersion) ? (string)__jsonSystemVersion : (string)_systemVersion;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._systemVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._systemVersion.ToString()) : null, "systemVersion" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.PowerShell.cs new file mode 100644 index 000000000000..b12950cdc997 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.PowerShell.cs @@ -0,0 +1,180 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// SystemVersions filter + [System.ComponentModel.TypeConverter(typeof(SystemVersionsFilterTypeConverter))] + public partial class SystemVersionsFilter + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersionsFilter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersionsFilter(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersionsFilter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("IsLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).IsLatestVersion = (bool?) content.GetValueForProperty("IsLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).IsLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersionsFilter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("IsLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).IsLatestVersion = (bool?) content.GetValueForProperty("IsLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal)this).IsLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// SystemVersions filter + [System.ComponentModel.TypeConverter(typeof(SystemVersionsFilterTypeConverter))] + public partial interface ISystemVersionsFilter + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.TypeConverter.cs new file mode 100644 index 000000000000..5498b9c5637c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionsFilterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersionsFilter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersionsFilter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersionsFilter.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.cs new file mode 100644 index 000000000000..6df25b99b203 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// SystemVersions filter + public partial class SystemVersionsFilter : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilterInternal + { + + /// Backing field for property. + private string _giVersion; + + /// Grid Infrastructure version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string GiVersion { get => this._giVersion; set => this._giVersion = value; } + + /// Backing field for property. + private bool? _isLatestVersion; + + /// Check If we have to list only latest versions + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public bool? IsLatestVersion { get => this._isLatestVersion; set => this._isLatestVersion = value; } + + /// Backing field for property. + private string _shape; + + /// Exadata shape + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Shape { get => this._shape; set => this._shape = value; } + + /// Creates an new instance. + public SystemVersionsFilter() + { + + } + } + /// SystemVersions filter + public partial interface ISystemVersionsFilter : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Grid Infrastructure version + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Grid Infrastructure version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; set; } + /// Check If we have to list only latest versions + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Check If we have to list only latest versions", + SerializedName = @"isLatestVersion", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLatestVersion { get; set; } + /// Exadata shape + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Exadata shape", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + + } + /// SystemVersions filter + internal partial interface ISystemVersionsFilterInternal + + { + /// Grid Infrastructure version + string GiVersion { get; set; } + /// Check If we have to list only latest versions + bool? IsLatestVersion { get; set; } + /// Exadata shape + string Shape { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.json.cs new file mode 100644 index 000000000000..ec53090649cc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/SystemVersionsFilter.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// SystemVersions filter + public partial class SystemVersionsFilter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemVersionsFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new SystemVersionsFilter(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersionsFilter(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_giVersion = If( json?.PropertyT("giVersion"), out var __jsonGiVersion) ? (string)__jsonGiVersion : (string)_giVersion;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)_shape;} + {_isLatestVersion = If( json?.PropertyT("isLatestVersion"), out var __jsonIsLatestVersion) ? (bool?)__jsonIsLatestVersion : _isLatestVersion;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._giVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._giVersion.ToString()) : null, "giVersion" ,container.Add ); + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + AddIf( null != this._isLatestVersion ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonBoolean((bool)this._isLatestVersion) : null, "isLatestVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..418fe6643304 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..c75a75b127b7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.cs new file mode 100644 index 000000000000..9e4607eb4db4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.json.cs new file mode 100644 index 000000000000..9c43a1c52eb8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResource.json.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs new file mode 100644 index 000000000000..13d0b36c8a5d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.PowerShell.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResourceTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResourceTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResourceTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..8f08f984be3b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.cs new file mode 100644 index 000000000000..849cc1452b42 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..5dc1a8136d40 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..be75622d5f0f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.PowerShell.cs new file mode 100644 index 000000000000..6fe1a7ee5205 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// validation error + [System.ComponentModel.TypeConverter(typeof(ValidationErrorTypeConverter))] + public partial class ValidationError + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidationError(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidationError(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidationError(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidationError(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// validation error + [System.ComponentModel.TypeConverter(typeof(ValidationErrorTypeConverter))] + public partial interface IValidationError + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.TypeConverter.cs new file mode 100644 index 000000000000..023be431bb15 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidationErrorTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidationError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidationError.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidationError.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.cs new file mode 100644 index 000000000000..760b2c552776 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// validation error + public partial class ValidationError : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal + { + + /// Backing field for property. + private string _code; + + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private string _message; + + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Creates an new instance. + public ValidationError() + { + + } + } + /// validation error + public partial interface IValidationError : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"error code", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"error message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + + } + /// validation error + internal partial interface IValidationErrorInternal + + { + /// error code + string Code { get; set; } + /// error message + string Message { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.json.cs new file mode 100644 index 000000000000..20e396ab2634 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationError.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// validation error + public partial class ValidationError + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ValidationError(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ValidationError(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)_code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)_message;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.PowerShell.cs new file mode 100644 index 000000000000..1b05331c4384 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// validation result + [System.ComponentModel.TypeConverter(typeof(ValidationResultTypeConverter))] + public partial class ValidationResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidationResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidationResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidationResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidationResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Status = (string) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// validation result + [System.ComponentModel.TypeConverter(typeof(ValidationResultTypeConverter))] + public partial interface IValidationResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.TypeConverter.cs new file mode 100644 index 000000000000..34b5d0d9b9f8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidationResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidationResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidationResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidationResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.cs new file mode 100644 index 000000000000..fb4bd9a848d0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.cs @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// validation result + public partial class ValidationResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal + { + + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)Error).Code = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError _error; + + /// validation error + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationError()); set => this._error = value; } + + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationErrorInternal)Error).Message = value ; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationError()); set { {_error = value;} } } + + /// Internal Acessors for Status + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResultInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private string _status; + + /// validation status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Status { get => this._status; } + + /// Creates an new instance. + public ValidationResult() + { + + } + } + /// validation result + public partial interface IValidationResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"error code", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"error message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// validation status + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"validation status", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string Status { get; } + + } + /// validation result + internal partial interface IValidationResultInternal + + { + /// error code + string Code { get; set; } + /// validation error + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationError Error { get; set; } + /// error message + string Message { get; set; } + /// validation status + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed")] + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.json.cs new file mode 100644 index 000000000000..1b9b930e3e1a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/ValidationResult.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// validation result + public partial class ValidationResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IValidationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new ValidationResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal ValidationResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ValidationError.FromJson(__jsonError) : _error;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.PowerShell.cs new file mode 100644 index 000000000000..78e51373ea9b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.PowerShell.cs @@ -0,0 +1,308 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// Virtual IP resource belonging to a vm cluster resource. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressTypeConverter))] + public partial class VirtualNetworkAddress + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualNetworkAddress(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualNetworkAddress(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualNetworkAddress(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualNetworkAddress(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + } + /// Virtual IP resource belonging to a vm cluster resource. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressTypeConverter))] + public partial interface IVirtualNetworkAddress + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.TypeConverter.cs new file mode 100644 index 000000000000..4c73bf10d21b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualNetworkAddressTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualNetworkAddress.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualNetworkAddress.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualNetworkAddress.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.cs new file mode 100644 index 000000000000..087d559a1747 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Virtual IP resource belonging to a vm cluster resource. + public partial class VirtualNetworkAddress : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(); + + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Domain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).Domain; } + + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string IPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).IPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).IPAddress = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; } + + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleDetail; } + + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleState; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type = value; } + + /// Internal Acessors for Domain + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal.Domain { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).Domain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).Domain = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for TimeAssigned + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressInternal.TimeAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).TimeAssigned; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).TimeAssigned = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Name; } + + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).ProvisioningState; } + + /// Gets the resource group name + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataCreatedByType = value ?? null; } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).SystemDataLastModifiedByType = value ?? null; } + + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).TimeAssigned; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IResourceInternal)__proxyResource).Type; } + + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Inlined)] + public string VMOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).VMOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)Property).VMOcid = value ?? null; } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource); + await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource); + } + + /// Creates an new instance. + public VirtualNetworkAddress() + { + + } + } + /// Virtual IP resource belonging to a vm cluster resource. + public partial interface IVirtualNetworkAddress : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResource + { + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Virtual network address fully qualified domain name.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; } + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Virtual network Address address.", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state of the application virtual IP (VIP) address.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"virtual network address lifecycle state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; } + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Application VIP OCID.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when the create operation for the application virtual IP (VIP) address completed.", + SerializedName = @"timeAssigned", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAssigned { get; } + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Virtual Machine OCID.", + SerializedName = @"vmOcid", + PossibleTypes = new [] { typeof(string) })] + string VMOcid { get; set; } + + } + /// Virtual IP resource belonging to a vm cluster resource. + internal partial interface IVirtualNetworkAddressInternal : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IProxyResourceInternal + { + /// Virtual network address fully qualified domain name. + string Domain { get; set; } + /// Virtual network Address address. + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + string LifecycleDetail { get; set; } + /// virtual network address lifecycle state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; set; } + /// Application VIP OCID. + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties Property { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + global::System.DateTime? TimeAssigned { get; set; } + /// Virtual Machine OCID. + string VMOcid { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.json.cs new file mode 100644 index 000000000000..aaa6071965ca --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddress.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// Virtual IP resource belonging to a vm cluster resource. + public partial class VirtualNetworkAddress + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new VirtualNetworkAddress(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __proxyResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualNetworkAddress(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ProxyResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressProperties.FromJson(__jsonProperties) : _property;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.PowerShell.cs new file mode 100644 index 000000000000..caa8e49cb822 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// The response of a VirtualNetworkAddress list operation. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressListResultTypeConverter))] + public partial class VirtualNetworkAddressListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualNetworkAddressListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualNetworkAddressListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualNetworkAddressListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualNetworkAddressListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The response of a VirtualNetworkAddress list operation. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressListResultTypeConverter))] + public partial interface IVirtualNetworkAddressListResult + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.TypeConverter.cs new file mode 100644 index 000000000000..ba9b52ccf407 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualNetworkAddressListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualNetworkAddressListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualNetworkAddressListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualNetworkAddressListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.cs new file mode 100644 index 000000000000..ca08afafa9c9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a VirtualNetworkAddress list operation. + public partial class VirtualNetworkAddressListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The VirtualNetworkAddress items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public VirtualNetworkAddressListResult() + { + + } + } + /// The response of a VirtualNetworkAddress list operation. + public partial interface IVirtualNetworkAddressListResult : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The VirtualNetworkAddress items on this page + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The VirtualNetworkAddress items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a VirtualNetworkAddress list operation. + internal partial interface IVirtualNetworkAddressListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The VirtualNetworkAddress items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.json.cs new file mode 100644 index 000000000000..6c2ad17a1204 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// The response of a VirtualNetworkAddress list operation. + public partial class VirtualNetworkAddressListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new VirtualNetworkAddressListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualNetworkAddressListResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddress.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.PowerShell.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.PowerShell.cs new file mode 100644 index 000000000000..fa2779bdb7c0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// virtualNetworkAddress resource properties + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressPropertiesTypeConverter))] + public partial class VirtualNetworkAddressProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualNetworkAddressProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualNetworkAddressProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualNetworkAddressProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualNetworkAddressProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState = (string) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState, global::System.Convert.ToString); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + } + /// virtualNetworkAddress resource properties + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressPropertiesTypeConverter))] + public partial interface IVirtualNetworkAddressProperties + + { + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.TypeConverter.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.TypeConverter.cs new file mode 100644 index 000000000000..173f2de7cd0a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualNetworkAddressPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualNetworkAddressProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualNetworkAddressProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualNetworkAddressProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.cs new file mode 100644 index 000000000000..76a939043f6b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// virtualNetworkAddress resource properties + public partial class VirtualNetworkAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal + { + + /// Backing field for property. + private string _domain; + + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Domain { get => this._domain; } + + /// Backing field for property. + private string _iPAddress; + + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string IPAddress { get => this._iPAddress; set => this._iPAddress = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private string _lifecycleState; + + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string LifecycleState { get => this._lifecycleState; } + + /// Internal Acessors for Domain + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal.Domain { get => this._domain; set { {_domain = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for TimeAssigned + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressPropertiesInternal.TimeAssigned { get => this._timeAssigned; set { {_timeAssigned = value;} } } + + /// Backing field for property. + private string _ocid; + + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private global::System.DateTime? _timeAssigned; + + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public global::System.DateTime? TimeAssigned { get => this._timeAssigned; } + + /// Backing field for property. + private string _vMOcid; + + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Origin(Microsoft.Azure.PowerShell.Cmdlets.Oracle.PropertyOrigin.Owned)] + public string VMOcid { get => this._vMOcid; set => this._vMOcid = value; } + + /// Creates an new instance. + public VirtualNetworkAddressProperties() + { + + } + } + /// virtualNetworkAddress resource properties + public partial interface IVirtualNetworkAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable + { + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Virtual network address fully qualified domain name.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; } + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Virtual network Address address.", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Additional information about the current lifecycle state of the application virtual IP (VIP) address.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"virtual network address lifecycle state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; } + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Application VIP OCID.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The date and time when the create operation for the application virtual IP (VIP) address completed.", + SerializedName = @"timeAssigned", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAssigned { get; } + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = false, + Description = @"Virtual Machine OCID.", + SerializedName = @"vmOcid", + PossibleTypes = new [] { typeof(string) })] + string VMOcid { get; set; } + + } + /// virtualNetworkAddress resource properties + internal partial interface IVirtualNetworkAddressPropertiesInternal + + { + /// Virtual network address fully qualified domain name. + string Domain { get; set; } + /// Virtual network Address address. + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + string LifecycleDetail { get; set; } + /// virtual network address lifecycle state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Provisioning", "Available", "Terminating", "Terminated", "Failed")] + string LifecycleState { get; set; } + /// Application VIP OCID. + string Ocid { get; set; } + /// Azure resource provisioning state. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Provisioning")] + string ProvisioningState { get; set; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + global::System.DateTime? TimeAssigned { get; set; } + /// Virtual Machine OCID. + string VMOcid { get; set; } + + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.json.cs b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.json.cs new file mode 100644 index 000000000000..d1d1a4f5e690 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Models/VirtualNetworkAddressProperties.json.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// virtualNetworkAddress resource properties + public partial class VirtualNetworkAddressProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddressProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new VirtualNetworkAddressProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._iPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._iPAddress.ToString()) : null, "ipAddress" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate)) + { + AddIf( null != (((object)this._vMOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._vMOcid.ToString()) : null, "vmOcid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._timeAssigned ? (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonString(this._timeAssigned?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeAssigned" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualNetworkAddressProperties(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_iPAddress = If( json?.PropertyT("ipAddress"), out var __jsonIPAddress) ? (string)__jsonIPAddress : (string)_iPAddress;} + {_vMOcid = If( json?.PropertyT("vmOcid"), out var __jsonVMOcid) ? (string)__jsonVMOcid : (string)_vMOcid;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)_ocid;} + {_domain = If( json?.PropertyT("domain"), out var __jsonDomain) ? (string)__jsonDomain : (string)_domain;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)_lifecycleDetail;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)_lifecycleState;} + {_timeAssigned = If( json?.PropertyT("timeAssigned"), out var __jsonTimeAssigned) ? global::System.DateTime.TryParse((string)__jsonTimeAssigned, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeAssignedValue) ? __jsonTimeAssignedValue : _timeAssigned : _timeAssigned;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/api/Oracle.cs b/src/Oracle/Oracle.Autorest/generated/api/Oracle.cs new file mode 100644 index 000000000000..679793552b1a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/api/Oracle.cs @@ -0,0 +1,27340 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// Low-level API implementation for the Oracle service. + /// + public partial class Oracle + { + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Json string supplied to the AutonomousDatabaseBackupsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Json string supplied to the AutonomousDatabaseBackupsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid), adbbackupid, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDelete(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a AutonomousDatabaseBackup + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDelete_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid), adbbackupid, @".*"); + } + } + + /// Get a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGet(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseBackup + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseBackup + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGetWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGet_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid), adbbackupid, @".*"); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByAutonomousDatabase(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsListByAutonomousDatabase_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByAutonomousDatabaseViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsListByAutonomousDatabase_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByAutonomousDatabaseViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsListByAutonomousDatabaseWithResult_Call (request, eventListener,sender); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByAutonomousDatabaseWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsListByAutonomousDatabaseWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByAutonomousDatabaseWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByAutonomousDatabase_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByAutonomousDatabase_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Json string supplied to the AutonomousDatabaseBackupsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Json string supplied to the AutonomousDatabaseBackupsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdateWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseBackupsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid), adbbackupid, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a AutonomousDatabaseCharacterSet + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGet(string subscriptionId, string location, string adbscharsetname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseCharacterSets/" + + global::System.Uri.EscapeDataString(adbscharsetname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseCharacterSet + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseCharacterSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var adbscharsetname = _match.Groups["adbscharsetname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseCharacterSets/" + + adbscharsetname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseCharacterSet + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseCharacterSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var adbscharsetname = _match.Groups["adbscharsetname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseCharacterSets/" + + adbscharsetname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseCharacterSetsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a AutonomousDatabaseCharacterSet + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGetWithResult(string subscriptionId, string location, string adbscharsetname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseCharacterSets/" + + global::System.Uri.EscapeDataString(adbscharsetname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseCharacterSetsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGet_Validate(string subscriptionId, string location, string adbscharsetname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(adbscharsetname),adbscharsetname); + await eventListener.AssertRegEx(nameof(adbscharsetname), adbscharsetname, @".*"); + } + } + + /// List AutonomousDatabaseCharacterSet resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseCharacterSet resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseCharacterSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseCharacterSet resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseCharacterSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseCharacterSetsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List AutonomousDatabaseCharacterSet resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseCharacterSetsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseCharacterSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a AutonomousDatabaseNationalCharacterSet + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGet(string subscriptionId, string location, string adbsncharsetname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseNationalCharacterSets/" + + global::System.Uri.EscapeDataString(adbsncharsetname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseNationalCharacterSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var adbsncharsetname = _match.Groups["adbsncharsetname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseNationalCharacterSets/" + + adbsncharsetname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseNationalCharacterSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var adbsncharsetname = _match.Groups["adbsncharsetname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseNationalCharacterSets/" + + adbsncharsetname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseNationalCharacterSetsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a AutonomousDatabaseNationalCharacterSet + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGetWithResult(string subscriptionId, string location, string adbsncharsetname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseNationalCharacterSets/" + + global::System.Uri.EscapeDataString(adbsncharsetname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseNationalCharacterSetsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGet_Validate(string subscriptionId, string location, string adbsncharsetname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(adbsncharsetname),adbsncharsetname); + await eventListener.AssertRegEx(nameof(adbsncharsetname), adbsncharsetname, @".*"); + } + } + + /// List AutonomousDatabaseNationalCharacterSet resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseNationalCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseNationalCharacterSet resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseNationalCharacterSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseNationalCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseNationalCharacterSet resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseNationalCharacterSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseNationalCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseNationalCharacterSetsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List AutonomousDatabaseNationalCharacterSet resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseNationalCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseNationalCharacterSetsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseNationalCharacterSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the + /// actual call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a AutonomousDbVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDbVersion name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGet(string subscriptionId, string location, string autonomousdbversionsname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDbVersions/" + + global::System.Uri.EscapeDataString(autonomousdbversionsname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDbVersion + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDbVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var autonomousdbversionsname = _match.Groups["autonomousdbversionsname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDbVersions/" + + autonomousdbversionsname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDbVersion + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDbVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var autonomousdbversionsname = _match.Groups["autonomousdbversionsname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDbVersions/" + + autonomousdbversionsname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseVersionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a AutonomousDbVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDbVersion name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGetWithResult(string subscriptionId, string location, string autonomousdbversionsname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDbVersions/" + + global::System.Uri.EscapeDataString(autonomousdbversionsname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseVersionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDbVersion name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGet_Validate(string subscriptionId, string location, string autonomousdbversionsname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(autonomousdbversionsname),autonomousdbversionsname); + await eventListener.AssertRegEx(nameof(autonomousdbversionsname), autonomousdbversionsname, @".*"); + } + } + + /// List AutonomousDbVersion resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDbVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDbVersion resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDbVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDbVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDbVersion resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDbVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDbVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseVersionsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List AutonomousDbVersion resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDbVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabaseVersionsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDbVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesDelete(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a AutonomousDatabase + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesDelete_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + } + } + + /// Perform failover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailover(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesFailover_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform failover action on Autonomous Database + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailoverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesFailover_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform failover action on Autonomous Database + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailoverViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesFailoverWithResult_Call (request, eventListener,sender); + } + } + + /// Perform failover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesFailover operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailoverViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesFailover_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform failover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesFailover operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailoverViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesFailoverWithResult_Call (request, eventListener,sender); + } + } + + /// Perform failover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailoverWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesFailoverWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesFailoverWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesFailover_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesFailover_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Generate wallet action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWallet(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGenerateWallet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Generate wallet action on Autonomous Database + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWalletViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGenerateWallet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Generate wallet action on Autonomous Database + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWalletViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesGenerateWalletWithResult_Call (request, eventListener,sender); + } + } + + /// Generate wallet action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesGenerateWallet operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWalletViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGenerateWallet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Generate wallet action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesGenerateWallet operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWalletViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesGenerateWalletWithResult_Call (request, eventListener,sender); + } + } + + /// Generate wallet action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWalletWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesGenerateWalletWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWalletWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseWalletFile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWallet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseWalletFile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWallet_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGenerateAutonomousDatabaseWalletDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGet(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabase + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabase + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGetWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGet_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + } + } + + /// List AutonomousDatabase resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabase resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabase resources by resource group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// List AutonomousDatabase resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List AutonomousDatabase resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabase resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/autonomousDatabases$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabase resources by subscription ID + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/autonomousDatabases$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// List AutonomousDatabase resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestore(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesRestore_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestoreViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesRestore_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestoreViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesRestoreWithResult_Call (request, eventListener,sender); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesRestore operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestoreViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesRestore_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesRestore operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestoreViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesRestoreWithResult_Call (request, eventListener,sender); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestoreWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesRestoreWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesRestoreWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesRestore_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesRestore_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesShrink(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/shrink" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesShrink_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesShrinkViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/shrink" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesShrink_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesShrinkViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/shrink" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesShrinkWithResult_Call (request, eventListener,sender); + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesShrinkWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/shrink" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesShrinkWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesShrinkWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesShrink_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesShrink_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + } + } + + /// Perform switchover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchover(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesSwitchover_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform switchover action on Autonomous Database + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchoverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesSwitchover_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform switchover action on Autonomous Database + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchoverViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesSwitchoverWithResult_Call (request, eventListener,sender); + } + } + + /// Perform switchover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesSwitchover operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchoverViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesSwitchover_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform switchover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesSwitchover operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchoverViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesSwitchoverWithResult_Call (request, eventListener,sender); + } + } + + /// Perform switchover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchoverWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesSwitchoverWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchoverWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchover_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchover_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdateViaJsonString(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Json string supplied to the AutonomousDatabasesUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdateWithResult(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.AutonomousDatabasesUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename), autonomousdatabasename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Perform add storage capacity on exadata infra + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacity(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/addStorageCapacity" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresAddStorageCapacity_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform add storage capacity on exadata infra + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacityViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/addStorageCapacity" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresAddStorageCapacity_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Perform add storage capacity on exadata infra + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/addStorageCapacity" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresAddStorageCapacityWithResult_Call (request, eventListener,sender); + } + } + + /// Perform add storage capacity on exadata infra + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacityWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/addStorageCapacity" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresAddStorageCapacityWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacityWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacity_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacity_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename), cloudexadatainfrastructurename, @".*"); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Json string supplied to the CloudExadataInfrastructuresCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Json string supplied to the CloudExadataInfrastructuresCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename), cloudexadatainfrastructurename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDelete(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a CloudExadataInfrastructure + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDelete_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename), cloudexadatainfrastructurename, @".*"); + } + } + + /// Get a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGet(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a CloudExadataInfrastructure + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a CloudExadataInfrastructure + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGetWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGet_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename), cloudexadatainfrastructurename, @".*"); + } + } + + /// List CloudExadataInfrastructure resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by resource group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Json string supplied to the CloudExadataInfrastructuresUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdateViaJsonString(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Json string supplied to the CloudExadataInfrastructuresUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdateWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudExadataInfrastructuresUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename), cloudexadatainfrastructurename, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Add VMs to the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVms(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersAddVms_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Add VMs to the VM Cluster + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVmsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersAddVms_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Add VMs to the VM Cluster + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVmsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersAddVmsWithResult_Call (request, eventListener,sender); + } + } + + /// Add VMs to the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersAddVms operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVmsViaJsonString(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersAddVms_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Add VMs to the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersAddVms operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVmsViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersAddVmsWithResult_Call (request, eventListener,sender); + } + } + + /// Add VMs to the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVmsWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersAddVmsWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersAddVmsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersAddVms_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersAddVms_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersDelete(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a CloudVmCluster + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersDelete_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + } + } + + /// Get a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersGet(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a CloudVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a CloudVmCluster + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersGetWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersGet_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + } + } + + /// List CloudVmCluster resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudVmCluster resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudVmCluster resources by resource group + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// List CloudVmCluster resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List CloudVmCluster resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudVmCluster resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/cloudVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List CloudVmCluster resources by subscription ID + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/cloudVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// List CloudVmCluster resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Private IP Addresses by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddresses(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter body, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListPrivateIPAddresses_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Private IP Addresses by the provided filter + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddressesViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter body, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListPrivateIPAddresses_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Private IP Addresses by the provided filter + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task> CloudVMClustersListPrivateIPAddressesViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersListPrivateIPAddressesWithResult_Call (request, eventListener,sender); + } + } + + /// List Private IP Addresses by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersListPrivateIPAddresses operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddressesViaJsonString(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListPrivateIPAddresses_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Private IP Addresses by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersListPrivateIPAddresses operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task> CloudVMClustersListPrivateIPAddressesViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersListPrivateIPAddressesWithResult_Call (request, eventListener,sender); + } + } + + /// List Private IP Addresses by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task> CloudVMClustersListPrivateIPAddressesWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersListPrivateIPAddressesWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task> CloudVMClustersListPrivateIPAddressesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => If( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray.Parse(body.Result) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __y) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__y, (__x)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PrivateIPAddressProperties.FromJson(__x) )) ))() : null); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddresses_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => If( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray.Parse(body.Result) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonArray, out var __y) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__y, (__x)=>(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressProperties) (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PrivateIPAddressProperties.FromJson(__x) )) ))() : null)); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddresses_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPrivateIPAddressesFilter body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Remove VMs from the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVms(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersRemoveVms_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Remove VMs from the VM Cluster + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVmsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersRemoveVms_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Remove VMs from the VM Cluster + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVmsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersRemoveVmsWithResult_Call (request, eventListener,sender); + } + } + + /// Remove VMs from the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersRemoveVms operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVmsViaJsonString(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersRemoveVms_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Remove VMs from the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersRemoveVms operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVmsViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersRemoveVmsWithResult_Call (request, eventListener,sender); + } + } + + /// Remove VMs from the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVmsWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersRemoveVmsWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersRemoveVmsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersRemoveVms_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersRemoveVms_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdateViaJsonString(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Json string supplied to the CloudVMClustersUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdateWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.CloudVMClustersUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesAction(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesAction_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesActionViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var dbnodeocid = _match.Groups["dbnodeocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes/" + + dbnodeocid + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesAction_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesActionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var dbnodeocid = _match.Groups["dbnodeocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes/" + + dbnodeocid + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbNodesActionWithResult_Call (request, eventListener,sender); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// Json string supplied to the DbNodesAction operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesActionViaJsonString(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesAction_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// Json string supplied to the DbNodesAction operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesActionViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbNodesActionWithResult_Call (request, eventListener,sender); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// The content of the action request + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesActionWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbNodesActionWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesActionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNode.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNode.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesAction_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(dbnodeocid),dbnodeocid); + await eventListener.AssertMinimumLength(nameof(dbnodeocid),dbnodeocid,1); + await eventListener.AssertMaximumLength(nameof(dbnodeocid),dbnodeocid,255); + await eventListener.AssertRegEx(nameof(dbnodeocid), dbnodeocid, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a DbNode + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesGet(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbNode + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var dbnodeocid = _match.Groups["dbnodeocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes/" + + dbnodeocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbNode + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var dbnodeocid = _match.Groups["dbnodeocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes/" + + dbnodeocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbNodesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a DbNode + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesGetWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbNodesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will + /// be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNode.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNode.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesGet_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(dbnodeocid),dbnodeocid); + await eventListener.AssertMinimumLength(nameof(dbnodeocid),dbnodeocid,1); + await eventListener.AssertMaximumLength(nameof(dbnodeocid),dbnodeocid,255); + await eventListener.AssertRegEx(nameof(dbnodeocid), dbnodeocid, @".*"); + } + } + + /// List DbNode resources by CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesListByCloudVMCluster(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesListByCloudVMCluster_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DbNode resources by CloudVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesListByCloudVMClusterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesListByCloudVMCluster_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DbNode resources by CloudVmCluster + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesListByCloudVMClusterViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbNodesListByCloudVMClusterWithResult_Call (request, eventListener,sender); + } + } + + /// List DbNode resources by CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesListByCloudVMClusterWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbNodesListByCloudVMClusterWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesListByCloudVMClusterWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesListByCloudVMCluster_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesListByCloudVMCluster_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + } + } + + /// Get a DbServer + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// DbServer OCID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersGet(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/dbServers/" + + global::System.Uri.EscapeDataString(dbserverocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbServer + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)/dbServers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + var dbserverocid = _match.Groups["dbserverocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/dbServers/" + + dbserverocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbServer + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)/dbServers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + var dbserverocid = _match.Groups["dbserverocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/dbServers/" + + dbserverocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbServersGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a DbServer + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// DbServer OCID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersGetWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/dbServers/" + + global::System.Uri.EscapeDataString(dbserverocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbServersGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServer.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServer.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// DbServer OCID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersGet_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename), cloudexadatainfrastructurename, @".*"); + await eventListener.AssertNotNull(nameof(dbserverocid),dbserverocid); + await eventListener.AssertMinimumLength(nameof(dbserverocid),dbserverocid,1); + await eventListener.AssertMaximumLength(nameof(dbserverocid),dbserverocid,255); + await eventListener.AssertRegEx(nameof(dbserverocid), dbserverocid, @".*"); + } + } + + /// List DbServer resources by CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersListByCloudExadataInfrastructure(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/dbServers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersListByCloudExadataInfrastructure_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DbServer resources by CloudExadataInfrastructure + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersListByCloudExadataInfrastructureViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)/dbServers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/dbServers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersListByCloudExadataInfrastructure_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DbServer resources by CloudExadataInfrastructure + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersListByCloudExadataInfrastructureViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)/dbServers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/dbServers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbServersListByCloudExadataInfrastructureWithResult_Call (request, eventListener,sender); + } + } + + /// List DbServer resources by CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersListByCloudExadataInfrastructureWithResult(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/dbServers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbServersListByCloudExadataInfrastructureWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersListByCloudExadataInfrastructureWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersListByCloudExadataInfrastructure_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbServerListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersListByCloudExadataInfrastructure_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename), cloudexadatainfrastructurename, @".*"); + } + } + + /// Get a DbSystemShape + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DbSystemShape name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesGet(string subscriptionId, string location, string dbsystemshapename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dbSystemShapes/" + + global::System.Uri.EscapeDataString(dbsystemshapename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbSystemShape + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dbSystemShapes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dbsystemshapename = _match.Groups["dbsystemshapename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dbSystemShapes/" + + dbsystemshapename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbSystemShape + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dbSystemShapes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dbsystemshapename = _match.Groups["dbsystemshapename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dbSystemShapes/" + + dbsystemshapename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbSystemShapesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a DbSystemShape + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DbSystemShape name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesGetWithResult(string subscriptionId, string location, string dbsystemshapename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dbSystemShapes/" + + global::System.Uri.EscapeDataString(dbsystemshapename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbSystemShapesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShape.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShape.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DbSystemShape name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesGet_Validate(string subscriptionId, string location, string dbsystemshapename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(dbsystemshapename),dbsystemshapename); + await eventListener.AssertRegEx(nameof(dbsystemshapename), dbsystemshapename, @".*"); + } + } + + /// List DbSystemShape resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dbSystemShapes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DbSystemShape resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dbSystemShapes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dbSystemShapes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DbSystemShape resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dbSystemShapes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dbSystemShapes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbSystemShapesListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List DbSystemShape resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dbSystemShapes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DbSystemShapesListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbSystemShapeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a DnsPrivateView + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateView OCID + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsGet(string subscriptionId, string location, string dnsprivateviewocid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateViews/" + + global::System.Uri.EscapeDataString(dnsprivateviewocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DnsPrivateView + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateViews/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dnsprivateviewocid = _match.Groups["dnsprivateviewocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateViews/" + + dnsprivateviewocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DnsPrivateView + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateViews/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dnsprivateviewocid = _match.Groups["dnsprivateviewocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateViews/" + + dnsprivateviewocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateViewsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a DnsPrivateView + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateView OCID + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsGetWithResult(string subscriptionId, string location, string dnsprivateviewocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateViews/" + + global::System.Uri.EscapeDataString(dnsprivateviewocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateViewsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateView.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateView.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateView OCID + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsGet_Validate(string subscriptionId, string location, string dnsprivateviewocid, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(dnsprivateviewocid),dnsprivateviewocid); + await eventListener.AssertMinimumLength(nameof(dnsprivateviewocid),dnsprivateviewocid,1); + await eventListener.AssertMaximumLength(nameof(dnsprivateviewocid),dnsprivateviewocid,255); + await eventListener.AssertRegEx(nameof(dnsprivateviewocid), dnsprivateviewocid, @".*"); + } + } + + /// List DnsPrivateView resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DnsPrivateView resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateViews$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DnsPrivateView resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateViews$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateViewsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List DnsPrivateView resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateViewsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateViewListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a DnsPrivateZone + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateZone name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesGet(string subscriptionId, string location, string dnsprivatezonename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateZones/" + + global::System.Uri.EscapeDataString(dnsprivatezonename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DnsPrivateZone + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dnsprivatezonename = _match.Groups["dnsprivatezonename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateZones/" + + dnsprivatezonename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a DnsPrivateZone + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dnsprivatezonename = _match.Groups["dnsprivatezonename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateZones/" + + dnsprivatezonename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateZonesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a DnsPrivateZone + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateZone name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesGetWithResult(string subscriptionId, string location, string dnsprivatezonename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateZones/" + + global::System.Uri.EscapeDataString(dnsprivatezonename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateZonesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateZone name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesGet_Validate(string subscriptionId, string location, string dnsprivatezonename, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(dnsprivatezonename),dnsprivatezonename); + await eventListener.AssertRegEx(nameof(dnsprivatezonename), dnsprivatezonename, @".*"); + } + } + + /// List DnsPrivateZone resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DnsPrivateZone resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateZones$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List DnsPrivateZone resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateZones$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateZonesListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List DnsPrivateZone resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.DnsPrivateZonesListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DnsPrivateZoneListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a GiVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsGet(string subscriptionId, string location, string giversionname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions/" + + global::System.Uri.EscapeDataString(giversionname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a GiVersion + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var giversionname = _match.Groups["giversionname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions/" + + giversionname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a GiVersion + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var giversionname = _match.Groups["giversionname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions/" + + giversionname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.GiVersionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a GiVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsGetWithResult(string subscriptionId, string location, string giversionname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions/" + + global::System.Uri.EscapeDataString(giversionname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.GiVersionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that + /// will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsGet_Validate(string subscriptionId, string location, string giversionname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(giversionname),giversionname); + await eventListener.AssertRegEx(nameof(giversionname), giversionname, @".*"); + } + } + + /// List GiVersion resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List GiVersion resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List GiVersion resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.GiVersionsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List GiVersion resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.GiVersionsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.GiVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// List the operations for the provider + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Oracle.Database/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Oracle.Database/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Oracle.Database/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Oracle.Database/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Oracle.Database/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Oracle.Database/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Oracle.Database/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// List the operations for the provider + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListWithResult(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Oracle.Database/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OperationsListWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsListWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a OracleSubscription + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a OracleSubscription + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// Json string supplied to the OracleSubscriptionsCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdateViaJsonString(string subscriptionId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// Json string supplied to the OracleSubscriptionsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdateWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdate_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscription body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsDelete(string subscriptionId, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a OracleSubscription + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsDelete_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Get a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsGet(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a OracleSubscription + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a OracleSubscription + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsGetWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsGet_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Activation Links + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinks(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListActivationLinks_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Activation Links + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinksViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListActivationLinks_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Activation Links + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinksViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListActivationLinksWithResult_Call (request, eventListener,sender); + } + } + + /// List Activation Links + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinksWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListActivationLinksWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinksWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ActivationLinks.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinks_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ActivationLinks.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinks_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List OracleSubscription resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List OracleSubscription resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List OracleSubscription resources by subscription ID + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// List OracleSubscription resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscriptionWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscriptionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Cloud Account Details + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetails(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListCloudAccountDetails_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Cloud Account Details + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListCloudAccountDetails_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Cloud Account Details + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetailsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListCloudAccountDetailsWithResult_Call (request, eventListener,sender); + } + } + + /// List Cloud Account Details + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetailsWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListCloudAccountDetailsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetailsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudAccountDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetails_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudAccountDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetails_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Saas Subscription Details + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetails(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListSaasSubscriptionDetails_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Saas Subscription Details + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListSaasSubscriptionDetails_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List Saas Subscription Details + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetailsViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListSaasSubscriptionDetailsWithResult_Call (request, eventListener,sender); + } + } + + /// List Saas Subscription Details + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetailsWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsListSaasSubscriptionDetailsWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetailsWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SaasSubscriptionDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetails_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SaasSubscriptionDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetails_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a OracleSubscription + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a OracleSubscription + /// + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// Json string supplied to the OracleSubscriptionsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdateViaJsonString(string subscriptionId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// Json string supplied to the OracleSubscriptionsUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdateViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// The resource properties to be updated. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdateWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.OracleSubscriptionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsUpdate_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleSubscriptionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a SystemVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// SystemVersion name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsGet(string subscriptionId, string location, string systemversionname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/systemVersions/" + + global::System.Uri.EscapeDataString(systemversionname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a SystemVersion + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/systemVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var systemversionname = _match.Groups["systemversionname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/systemVersions/" + + systemversionname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a SystemVersion + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/systemVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var systemversionname = _match.Groups["systemversionname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/systemVersions/" + + systemversionname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SystemVersionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a SystemVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// SystemVersion name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsGetWithResult(string subscriptionId, string location, string systemversionname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/systemVersions/" + + global::System.Uri.EscapeDataString(systemversionname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SystemVersionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A + /// that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// SystemVersion name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsGet_Validate(string subscriptionId, string location, string systemversionname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(systemversionname),systemversionname); + await eventListener.AssertRegEx(nameof(systemversionname), systemversionname, @".*"); + } + } + + /// List SystemVersion resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/systemVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List SystemVersion resources by Location + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/systemVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/systemVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsListByLocation_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List SystemVersion resources by Location + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsListByLocationViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/systemVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/systemVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SystemVersionsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// List SystemVersion resources by Location + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsListByLocationWithResult(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/systemVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.SystemVersionsListByLocationWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsListByLocationWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.SystemVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Update a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a VirtualNetworkAddress + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a VirtualNetworkAddress + /// + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.VirtualNetworkAddressesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// Json string supplied to the VirtualNetworkAddressesCreateOrUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Update a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// Json string supplied to the VirtualNetworkAddressesCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.VirtualNetworkAddressesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Update a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// Resource create parameters. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.VirtualNetworkAddressesCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddress.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddress.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IVirtualNetworkAddress body, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(virtualnetworkaddressname),virtualnetworkaddressname); + await eventListener.AssertMinimumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,1); + await eventListener.AssertMaximumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,63); + await eventListener.AssertRegEx(nameof(virtualnetworkaddressname), virtualnetworkaddressname, @".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesDelete(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Delete a VirtualNetworkAddress + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesDelete_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(virtualnetworkaddressname),virtualnetworkaddressname); + await eventListener.AssertMinimumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,1); + await eventListener.AssertMaximumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,63); + await eventListener.AssertRegEx(nameof(virtualnetworkaddressname), virtualnetworkaddressname, @".*"); + } + } + + /// Get a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesGet(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a VirtualNetworkAddress + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Get a VirtualNetworkAddress + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.VirtualNetworkAddressesGetWithResult_Call (request, eventListener,sender); + } + } + + /// Get a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesGetWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.VirtualNetworkAddressesGetWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddress.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddress.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesGet_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + await eventListener.AssertNotNull(nameof(virtualnetworkaddressname),virtualnetworkaddressname); + await eventListener.AssertMinimumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,1); + await eventListener.AssertMaximumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,63); + await eventListener.AssertRegEx(nameof(virtualnetworkaddressname), virtualnetworkaddressname, @".*"); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByCloudVMCluster(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesListByCloudVMCluster_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByCloudVMClusterViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesListByCloudVMCluster_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster + /// + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByCloudVMClusterViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.VirtualNetworkAddressesListByCloudVMClusterWithResult_Call (request, eventListener,sender); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByCloudVMClusterWithResult(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + var apiVersion = @"2023-09-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.VirtualNetworkAddressesListByCloudVMClusterWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByCloudVMClusterWithResult_Call(global::System.Net.Http.HttpRequestMessage request, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByCloudVMCluster_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.VirtualNetworkAddressListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByCloudVMCluster_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername), cloudvmclustername, @".*"); + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddExpanded.cs new file mode 100644 index 000000000000..22acfeb13545 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddExpanded.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleCloudVMClusterVM_AddExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2023-09-01")] + public partial class AddAzOracleCloudVMClusterVM_AddExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer?.ToArray() ?? null /* fixedArrayOf */; set => _body.DbServer = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Initializes a new instance of the cmdlet class. + /// + public AddAzOracleCloudVMClusterVM_AddExpanded() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of AddAzOracleCloudVMClusterVM_AddExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.AddAzOracleCloudVMClusterVM_AddExpanded Clone() + { + var clone = new AddAzOracleCloudVMClusterVM_AddExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersAddVms(SubscriptionId, ResourceGroupName, Cloudvmclustername, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded.cs new file mode 100644 index 000000000000..774772b49634 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded.cs @@ -0,0 +1,583 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleCloudVMClusterVM_AddViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2023-09-01")] + public partial class AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer?.ToArray() ?? null /* fixedArrayOf */; set => _body.DbServer = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Initializes a new instance of the cmdlet class. + /// + public AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded Clone() + { + var clone = new AddAzOracleCloudVMClusterVM_AddViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersAddVmsViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersAddVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonFilePath.cs new file mode 100644 index 000000000000..a2cf95870d04 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonFilePath.cs @@ -0,0 +1,606 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleCloudVMClusterVM_AddViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class AddAzOracleCloudVMClusterVM_AddViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Add operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Add operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Add operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Initializes a new instance of the cmdlet class. + /// + public AddAzOracleCloudVMClusterVM_AddViaJsonFilePath() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of AddAzOracleCloudVMClusterVM_AddViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.AddAzOracleCloudVMClusterVM_AddViaJsonFilePath Clone() + { + var clone = new AddAzOracleCloudVMClusterVM_AddViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersAddVmsViaJsonString(SubscriptionId, ResourceGroupName, Cloudvmclustername, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonString.cs new file mode 100644 index 000000000000..3dbaba796e26 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/AddAzOracleCloudVMClusterVM_AddViaJsonString.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleCloudVMClusterVM_AddViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class AddAzOracleCloudVMClusterVM_AddViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Add operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Add operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Add operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Initializes a new instance of the cmdlet class. + /// + public AddAzOracleCloudVMClusterVM_AddViaJsonString() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of AddAzOracleCloudVMClusterVM_AddViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.AddAzOracleCloudVMClusterVM_AddViaJsonString Clone() + { + var clone = new AddAzOracleCloudVMClusterVM_AddViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersAddVmsViaJsonString(SubscriptionId, ResourceGroupName, Cloudvmclustername, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_Get.cs new file mode 100644 index 000000000000..e2406a88a3f9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_Get.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseBackup + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseBackup_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseBackup_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseBackup_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsGet(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentity.cs new file mode 100644 index 000000000000..4c6450076c6a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseBackup + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseBackup_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseBackup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseBackup_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseBackupsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbbackupid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbbackupid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseBackupsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, InputObject.Adbbackupid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase.cs new file mode 100644 index 000000000000..ad9cf922a327 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseBackup + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _autonomousDatabaseInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity AutonomousDatabaseInputObject { get => this._autonomousDatabaseInputObject; set => this._autonomousDatabaseInputObject = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public GetAzOracleAutonomousDatabaseBackup_GetViaIdentityAutonomousDatabase() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (AutonomousDatabaseInputObject?.Id != null) + { + this.AutonomousDatabaseInputObject.Id += $"/autonomousDatabaseBackups/{(global::System.Uri.EscapeDataString(this.Adbbackupid.ToString()))}"; + await this.Client.AutonomousDatabaseBackupsGetViaIdentity(AutonomousDatabaseInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == AutonomousDatabaseInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AutonomousDatabaseInputObject has null value for AutonomousDatabaseInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AutonomousDatabaseInputObject) ); + } + if (null == AutonomousDatabaseInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AutonomousDatabaseInputObject has null value for AutonomousDatabaseInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AutonomousDatabaseInputObject) ); + } + if (null == AutonomousDatabaseInputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AutonomousDatabaseInputObject has null value for AutonomousDatabaseInputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AutonomousDatabaseInputObject) ); + } + await this.Client.AutonomousDatabaseBackupsGet(AutonomousDatabaseInputObject.SubscriptionId ?? null, AutonomousDatabaseInputObject.ResourceGroupName ?? null, AutonomousDatabaseInputObject.Autonomousdatabasename ?? null, Adbbackupid, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_List.cs new file mode 100644 index 000000000000..64af935482c6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseBackup_List.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// + /// [OpenAPI] ListByAutonomousDatabase=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseBackup_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List AutonomousDatabaseBackup resources by AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseBackup_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseBackup_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsListByAutonomousDatabase(SubscriptionId, ResourceGroupName, Autonomousdatabasename, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackupListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsListByAutonomousDatabase_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_Get.cs new file mode 100644 index 000000000000..f58644980255 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_Get.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseCharacterSet_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseCharacterSet_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbscharsetname; + + /// AutonomousDatabaseCharacterSet name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseCharacterSet name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseCharacterSet name", + SerializedName = @"adbscharsetname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbscharsetname { get => this._adbscharsetname; set => this._adbscharsetname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseCharacterSet_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseCharacterSetsGet(SubscriptionId, Location, Adbscharsetname, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Adbscharsetname=Adbscharsetname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentity.cs new file mode 100644 index 000000000000..4b0149f4ffa6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseCharacterSet_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseCharacterSetsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbscharsetname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbscharsetname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseCharacterSetsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Adbscharsetname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..293091fcbf92 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbscharsetname; + + /// AutonomousDatabaseCharacterSet name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseCharacterSet name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseCharacterSet name", + SerializedName = @"adbscharsetname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbscharsetname { get => this._adbscharsetname; set => this._adbscharsetname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleAutonomousDatabaseCharacterSet_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/autonomousDatabaseCharacterSets/{(global::System.Uri.EscapeDataString(this.Adbscharsetname.ToString()))}"; + await this.Client.AutonomousDatabaseCharacterSetsGetViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.AutonomousDatabaseCharacterSetsGet(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Adbscharsetname, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Adbscharsetname=Adbscharsetname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_List.cs new file mode 100644 index 000000000000..e69d624dd43a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseCharacterSet_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List AutonomousDatabaseCharacterSet resources by Location + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseCharacterSet_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List AutonomousDatabaseCharacterSet resources by Location")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseCharacterSet_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseCharacterSet_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseCharacterSetsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSetListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseCharacterSetsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_Get.cs new file mode 100644 index 000000000000..88648fa5ff8a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_Get.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseNationalCharacterSet_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseNationalCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseNationalCharacterSet_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbsncharsetname; + + /// AutonomousDatabaseNationalCharacterSets name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseNationalCharacterSets name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseNationalCharacterSets name", + SerializedName = @"adbsncharsetname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbsncharsetname { get => this._adbsncharsetname; set => this._adbsncharsetname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseNationalCharacterSet_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseNationalCharacterSetsGet(SubscriptionId, Location, Adbsncharsetname, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Adbsncharsetname=Adbsncharsetname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity.cs new file mode 100644 index 000000000000..714325a767fe --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity.cs @@ -0,0 +1,486 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseNationalCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseNationalCharacterSetsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbsncharsetname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbsncharsetname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseNationalCharacterSetsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Adbsncharsetname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..31d036154980 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabaseNationalCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbsncharsetname; + + /// AutonomousDatabaseNationalCharacterSets name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseNationalCharacterSets name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseNationalCharacterSets name", + SerializedName = @"adbsncharsetname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbsncharsetname { get => this._adbsncharsetname; set => this._adbsncharsetname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseNationalCharacterSet_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/autonomousDatabaseNationalCharacterSets/{(global::System.Uri.EscapeDataString(this.Adbsncharsetname.ToString()))}"; + await this.Client.AutonomousDatabaseNationalCharacterSetsGetViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.AutonomousDatabaseNationalCharacterSetsGet(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Adbsncharsetname, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Adbsncharsetname=Adbsncharsetname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_List.cs new file mode 100644 index 000000000000..04f12d0395bd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseNationalCharacterSet_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List AutonomousDatabaseNationalCharacterSet resources by Location + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseNationalCharacterSet_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List AutonomousDatabaseNationalCharacterSet resources by Location")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseNationalCharacterSet_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseNationalCharacterSet_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseNationalCharacterSetsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSetListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseNationalCharacterSetsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_Get.cs new file mode 100644 index 000000000000..8123ed6d2b50 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_Get.cs @@ -0,0 +1,507 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDbVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseVersion_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDbVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseVersion_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _autonomousdbversionsname; + + /// AutonomousDbVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDbVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDbVersion name", + SerializedName = @"autonomousdbversionsname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdbversionsname { get => this._autonomousdbversionsname; set => this._autonomousdbversionsname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseVersion_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseVersionsGet(SubscriptionId, Location, Autonomousdbversionsname, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Autonomousdbversionsname=Autonomousdbversionsname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentity.cs new file mode 100644 index 000000000000..b0459e00e266 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDbVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseVersion_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDbVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseVersion_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseVersionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdbversionsname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdbversionsname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseVersionsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Autonomousdbversionsname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentityLocation.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..4406cbcdde49 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_GetViaIdentityLocation.cs @@ -0,0 +1,496 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDbVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseVersion_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDbVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseVersion_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _autonomousdbversionsname; + + /// AutonomousDbVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDbVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDbVersion name", + SerializedName = @"autonomousdbversionsname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdbversionsname { get => this._autonomousdbversionsname; set => this._autonomousdbversionsname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseVersion_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/autonomousDbVersions/{(global::System.Uri.EscapeDataString(this.Autonomousdbversionsname.ToString()))}"; + await this.Client.AutonomousDatabaseVersionsGetViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.AutonomousDatabaseVersionsGet(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Autonomousdbversionsname, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Autonomousdbversionsname=Autonomousdbversionsname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_List.cs new file mode 100644 index 000000000000..036a19f7823d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabaseVersion_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List AutonomousDbVersion resources by Location + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabaseVersion_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List AutonomousDbVersion resources by Location")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabaseVersion_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabaseVersion_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseVersionsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersionListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseVersionsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_Get.cs new file mode 100644 index 000000000000..0e3f6a9810f2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_Get.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabase + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabase_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabase_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabase_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_GetViaIdentity.cs new file mode 100644 index 000000000000..f4db0c0b6a62 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a AutonomousDatabase + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabase_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabase_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabase_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List.cs new file mode 100644 index 000000000000..6a507f49bc1a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List AutonomousDatabase resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabase_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List AutonomousDatabase resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabase_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabase_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List1.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List1.cs new file mode 100644 index 000000000000..87a55ea2f870 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleAutonomousDatabase_List1.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List AutonomousDatabase resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleAutonomousDatabase_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List AutonomousDatabase resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases", ApiVersion = "2023-09-01")] + public partial class GetAzOracleAutonomousDatabase_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleAutonomousDatabase_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_Get.cs new file mode 100644 index 000000000000..4d475e89fa00 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_Get.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a CloudExadataInfrastructure + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudExadataInfrastructure_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudExadataInfrastructure_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudExadataInfrastructure_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_GetViaIdentity.cs new file mode 100644 index 000000000000..4be47360ee5e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a CloudExadataInfrastructure + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudExadataInfrastructure_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudExadataInfrastructure_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudExadataInfrastructure_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudExadataInfrastructuresGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudExadataInfrastructuresGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List.cs new file mode 100644 index 000000000000..d142524d2526 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudExadataInfrastructure_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List CloudExadataInfrastructure resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudExadataInfrastructure_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudExadataInfrastructure_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List1.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List1.cs new file mode 100644 index 000000000000..963f2897010b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudExadataInfrastructure_List1.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List CloudExadataInfrastructure resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudExadataInfrastructure_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List CloudExadataInfrastructure resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudExadataInfrastructure_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudExadataInfrastructure_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_Get.cs new file mode 100644 index 000000000000..14f9821af4ff --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_Get.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a CloudVmCluster + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudVMCluster_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudVMCluster_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudVMCluster_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_GetViaIdentity.cs new file mode 100644 index 000000000000..5163d021a2b8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a CloudVmCluster + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudVMCluster_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudVMCluster_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudVMCluster_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List.cs new file mode 100644 index 000000000000..eb0176cd9348 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List CloudVmCluster resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudVMCluster_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List CloudVmCluster resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudVMCluster_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudVMCluster_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List1.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List1.cs new file mode 100644 index 000000000000..adc3d244f377 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleCloudVMCluster_List1.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List CloudVmCluster resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleCloudVMCluster_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List CloudVmCluster resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters", ApiVersion = "2023-09-01")] + public partial class GetAzOracleCloudVMCluster_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleCloudVMCluster_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_Get.cs new file mode 100644 index 000000000000..b364bc78236b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_Get.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbNode + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbNode_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbNode")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbNode_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbnodeocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbNode_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesGet(SubscriptionId, ResourceGroupName, Cloudvmclustername, Ocid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentity.cs new file mode 100644 index 000000000000..c32fc6c83517 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbNode + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbNode_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbNode")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbNode_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbNode_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbNodesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbnodeocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbnodeocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbNodesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, InputObject.Dbnodeocid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentityCloudVMCluster.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentityCloudVMCluster.cs new file mode 100644 index 000000000000..706af6e12f60 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_GetViaIdentityCloudVMCluster.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbNode + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbNode_GetViaIdentityCloudVMCluster")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbNode")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbNode_GetViaIdentityCloudVMCluster : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _cloudVMClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity CloudVMClusterInputObject { get => this._cloudVMClusterInputObject; set => this._cloudVMClusterInputObject = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbnodeocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbNode_GetViaIdentityCloudVMCluster() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CloudVMClusterInputObject?.Id != null) + { + this.CloudVMClusterInputObject.Id += $"/dbNodes/{(global::System.Uri.EscapeDataString(this.Ocid.ToString()))}"; + await this.Client.DbNodesGetViaIdentity(CloudVMClusterInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CloudVMClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudVMClusterInputObject has null value for CloudVMClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudVMClusterInputObject) ); + } + if (null == CloudVMClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudVMClusterInputObject has null value for CloudVMClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudVMClusterInputObject) ); + } + if (null == CloudVMClusterInputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudVMClusterInputObject has null value for CloudVMClusterInputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudVMClusterInputObject) ); + } + await this.Client.DbNodesGet(CloudVMClusterInputObject.SubscriptionId ?? null, CloudVMClusterInputObject.ResourceGroupName ?? null, CloudVMClusterInputObject.Cloudvmclustername ?? null, Ocid, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_List.cs new file mode 100644 index 000000000000..e21e23644482 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbNode_List.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List DbNode resources by CloudVmCluster + /// + /// [OpenAPI] ListByCloudVmCluster=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbNode_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List DbNode resources by CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbNode_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbNode_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesListByCloudVMCluster(SubscriptionId, ResourceGroupName, Cloudvmclustername, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesListByCloudVMCluster_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_Get.cs new file mode 100644 index 000000000000..16d9c4ce413a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_Get.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbServer + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbServer_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbServer")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbServer_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudexadatainfrastructurename; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudexadatainfrastructurename { get => this._cloudexadatainfrastructurename; set => this._cloudexadatainfrastructurename = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DbServer OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbServer OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbServer OCID.", + SerializedName = @"dbserverocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbserverocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbServer_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbServersGet(SubscriptionId, ResourceGroupName, Cloudexadatainfrastructurename, Ocid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudexadatainfrastructurename=Cloudexadatainfrastructurename,Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentity.cs new file mode 100644 index 000000000000..f68b2b0a12e0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbServer + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbServer_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbServer")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbServer_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbServer_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbServersGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbserverocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbserverocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbServersGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, InputObject.Dbserverocid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentityCloudExadataInfrastructure.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentityCloudExadataInfrastructure.cs new file mode 100644 index 000000000000..8695219b535f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_GetViaIdentityCloudExadataInfrastructure.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbServer + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbServer_GetViaIdentityCloudExadataInfrastructure")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbServer")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbServer_GetViaIdentityCloudExadataInfrastructure : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// Backing field for property. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _cloudExadataInfrastructureInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity CloudExadataInfrastructureInputObject { get => this._cloudExadataInfrastructureInputObject; set => this._cloudExadataInfrastructureInputObject = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DbServer OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbServer OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbServer OCID.", + SerializedName = @"dbserverocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbserverocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbServer_GetViaIdentityCloudExadataInfrastructure() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CloudExadataInfrastructureInputObject?.Id != null) + { + this.CloudExadataInfrastructureInputObject.Id += $"/dbServers/{(global::System.Uri.EscapeDataString(this.Ocid.ToString()))}"; + await this.Client.DbServersGetViaIdentity(CloudExadataInfrastructureInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CloudExadataInfrastructureInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudExadataInfrastructureInputObject has null value for CloudExadataInfrastructureInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudExadataInfrastructureInputObject) ); + } + if (null == CloudExadataInfrastructureInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudExadataInfrastructureInputObject has null value for CloudExadataInfrastructureInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudExadataInfrastructureInputObject) ); + } + if (null == CloudExadataInfrastructureInputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudExadataInfrastructureInputObject has null value for CloudExadataInfrastructureInputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudExadataInfrastructureInputObject) ); + } + await this.Client.DbServersGet(CloudExadataInfrastructureInputObject.SubscriptionId ?? null, CloudExadataInfrastructureInputObject.ResourceGroupName ?? null, CloudExadataInfrastructureInputObject.Cloudexadatainfrastructurename ?? null, Ocid, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_List.cs new file mode 100644 index 000000000000..a3e2b6ea2a08 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbServer_List.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List DbServer resources by CloudExadataInfrastructure + /// + /// [OpenAPI] ListByCloudExadataInfrastructure=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbServer_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List DbServer resources by CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbServer_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudexadatainfrastructurename; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudexadatainfrastructurename { get => this._cloudexadatainfrastructurename; set => this._cloudexadatainfrastructurename = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbServer_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbServersListByCloudExadataInfrastructure(SubscriptionId, ResourceGroupName, Cloudexadatainfrastructurename, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudexadatainfrastructurename=Cloudexadatainfrastructurename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServerListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbServersListByCloudExadataInfrastructure_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_Get.cs new file mode 100644 index 000000000000..2adccbf8ba38 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_Get.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbSystemShape + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbSystemShape_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbSystemShape")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbSystemShape_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// DbSystemShape name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbSystemShape name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbSystemShape name", + SerializedName = @"dbsystemshapename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbsystemshapename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbSystemShape_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbSystemShapesGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentity.cs new file mode 100644 index 000000000000..e1a981e3159d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbSystemShape + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbSystemShape_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbSystemShape")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbSystemShape_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbSystemShape_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbSystemShapesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbsystemshapename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbsystemshapename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbSystemShapesGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Dbsystemshapename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentityLocation.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..8a70cd0c5609 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_GetViaIdentityLocation.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DbSystemShape + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbSystemShape_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DbSystemShape")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbSystemShape_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// DbSystemShape name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbSystemShape name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbSystemShape name", + SerializedName = @"dbsystemshapename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbsystemshapename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbSystemShape_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/dbSystemShapes/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DbSystemShapesGetViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.DbSystemShapesGet(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_List.cs new file mode 100644 index 000000000000..242cc0d38cf4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDbSystemShape_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List DbSystemShape resources by Location + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDbSystemShape_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List DbSystemShape resources by Location")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDbSystemShape_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDbSystemShape_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbSystemShapesListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShapeListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbSystemShapesListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_Get.cs new file mode 100644 index 000000000000..f5787fd09c3d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_Get.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DnsPrivateView + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateView_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DnsPrivateView")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateView_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DnsPrivateView OCID + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DnsPrivateView OCID")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DnsPrivateView OCID", + SerializedName = @"dnsprivateviewocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dnsprivateviewocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateView_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateViewsGet(SubscriptionId, Location, Ocid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentity.cs new file mode 100644 index 000000000000..e6f535098e4d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DnsPrivateView + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateView_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DnsPrivateView")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateView_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateView_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DnsPrivateViewsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dnsprivateviewocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dnsprivateviewocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DnsPrivateViewsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Dnsprivateviewocid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentityLocation.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..fe90d2bdc5f3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_GetViaIdentityLocation.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DnsPrivateView + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateView_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DnsPrivateView")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateView_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DnsPrivateView OCID + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DnsPrivateView OCID")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DnsPrivateView OCID", + SerializedName = @"dnsprivateviewocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dnsprivateviewocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateView_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/dnsPrivateViews/{(global::System.Uri.EscapeDataString(this.Ocid.ToString()))}"; + await this.Client.DnsPrivateViewsGetViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.DnsPrivateViewsGet(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Ocid, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_List.cs new file mode 100644 index 000000000000..5dfa5444131d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateView_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List DnsPrivateView resources by Location + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateView_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List DnsPrivateView resources by Location")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateView_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateView_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateViewsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateViewListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateViewsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_Get.cs new file mode 100644 index 000000000000..eed888024431 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_Get.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DnsPrivateZone + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateZone_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DnsPrivateZone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateZone_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// DnsPrivateZone name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DnsPrivateZone name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DnsPrivateZone name", + SerializedName = @"dnsprivatezonename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dnsprivatezonename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateZone_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateZonesGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentity.cs new file mode 100644 index 000000000000..cc969ede14c6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DnsPrivateZone + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateZone_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DnsPrivateZone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateZone_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateZone_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DnsPrivateZonesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dnsprivatezonename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dnsprivatezonename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DnsPrivateZonesGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Dnsprivatezonename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentityLocation.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..42377e954ab6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_GetViaIdentityLocation.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a DnsPrivateZone + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateZone_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a DnsPrivateZone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateZone_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// DnsPrivateZone name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DnsPrivateZone name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DnsPrivateZone name", + SerializedName = @"dnsprivatezonename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dnsprivatezonename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateZone_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/dnsPrivateZones/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.DnsPrivateZonesGetViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.DnsPrivateZonesGet(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_List.cs new file mode 100644 index 000000000000..6ae5aa07d31c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleDnsPrivateZone_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List DnsPrivateZone resources by Location + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDnsPrivateZone_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List DnsPrivateZone resources by Location")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones", ApiVersion = "2023-09-01")] + public partial class GetAzOracleDnsPrivateZone_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleDnsPrivateZone_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateZonesListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZoneListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateZonesListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_Get.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_Get.cs new file mode 100644 index 000000000000..67d8afd272e0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_Get.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a GiVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleGiVersion_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a GiVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleGiVersion_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// GiVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "GiVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"GiVersion name", + SerializedName = @"giversionname", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Giversionname")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleGiVersion_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiVersionsGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentity.cs new file mode 100644 index 000000000000..6afcdcb10fb2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a GiVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleGiVersion_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a GiVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleGiVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleGiVersion_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.GiVersionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Giversionname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Giversionname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.GiVersionsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Giversionname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentityLocation.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentityLocation.cs new file mode 100644 index 000000000000..52ff95d71602 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_GetViaIdentityLocation.cs @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Get a GiVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleGiVersion_GetViaIdentityLocation")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Get a GiVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}", ApiVersion = "2023-09-01")] + public partial class GetAzOracleGiVersion_GetViaIdentityLocation : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _locationInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity LocationInputObject { get => this._locationInputObject; set => this._locationInputObject = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// GiVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "GiVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"GiVersion name", + SerializedName = @"giversionname", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Giversionname")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleGiVersion_GetViaIdentityLocation() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (LocationInputObject?.Id != null) + { + this.LocationInputObject.Id += $"/giVersions/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.GiVersionsGetViaIdentity(LocationInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == LocationInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + if (null == LocationInputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("LocationInputObject has null value for LocationInputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, LocationInputObject) ); + } + await this.Client.GiVersionsGet(LocationInputObject.SubscriptionId ?? null, LocationInputObject.Location ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_List.cs new file mode 100644 index 000000000000..dd3e917013ff --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleGiVersion_List.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List GiVersion resources by Location + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleGiVersion_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List GiVersion resources by Location")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions", ApiVersion = "2023-09-01")] + public partial class GetAzOracleGiVersion_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleGiVersion_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiVersionsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersionListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiVersionsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleOperation_List.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleOperation_List.cs new file mode 100644 index 000000000000..4f851858a554 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/GetAzOracleOperation_List.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// List the operations for the provider + /// + /// [OpenAPI] List=>GET:"/providers/Oracle.Database/operations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleOperation_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"List the operations for the provider")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/providers/Oracle.Database/operations", ApiVersion = "2023-09-01")] + public partial class GetAzOracleOperation_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzOracleOperation_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList(onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperationListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionExpanded.cs new file mode 100644 index 000000000000..22ee9d61c292 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionExpanded.cs @@ -0,0 +1,620 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleActionDbNode_ActionExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2023-09-01")] + public partial class InvokeAzOracleActionDbNode_ActionExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// DbNode action object + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeAction(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Db action + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db action")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Start", "Stop", "SoftReset", "Reset")] + public string Action { get => _body.Action ?? null; set => _body.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzOracleActionDbNode_ActionExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleActionDbNode_ActionExpanded Clone() + { + var clone = new InvokeAzOracleActionDbNode_ActionExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Dbnodeocid = this.Dbnodeocid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzOracleActionDbNode_ActionExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesAction(SubscriptionId, ResourceGroupName, Cloudvmclustername, Dbnodeocid, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Dbnodeocid=Dbnodeocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded.cs new file mode 100644 index 000000000000..b12cac032bcf --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded.cs @@ -0,0 +1,602 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2023-09-01")] + public partial class InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// DbNode action object + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeAction(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Db action + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db action")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Start", "Stop", "SoftReset", "Reset")] + public string Action { get => _body.Action ?? null; set => _body.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _cloudVMClusterInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity CloudVMClusterInputObject { get => this._cloudVMClusterInputObject; set => this._cloudVMClusterInputObject = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded Clone() + { + var clone = new InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.Dbnodeocid = this.Dbnodeocid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzOracleActionDbNode_ActionViaIdentityCloudVMClusterExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (CloudVMClusterInputObject?.Id != null) + { + this.CloudVMClusterInputObject.Id += $"/dbNodes/{(global::System.Uri.EscapeDataString(this.Dbnodeocid.ToString()))}"; + await this.Client.DbNodesActionViaIdentity(CloudVMClusterInputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == CloudVMClusterInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudVMClusterInputObject has null value for CloudVMClusterInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudVMClusterInputObject) ); + } + if (null == CloudVMClusterInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudVMClusterInputObject has null value for CloudVMClusterInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudVMClusterInputObject) ); + } + if (null == CloudVMClusterInputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("CloudVMClusterInputObject has null value for CloudVMClusterInputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, CloudVMClusterInputObject) ); + } + await this.Client.DbNodesAction(CloudVMClusterInputObject.SubscriptionId ?? null, CloudVMClusterInputObject.ResourceGroupName ?? null, CloudVMClusterInputObject.Cloudvmclustername ?? null, Dbnodeocid, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Dbnodeocid=Dbnodeocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityExpanded.cs new file mode 100644 index 000000000000..6c9dd809c794 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaIdentityExpanded.cs @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleActionDbNode_ActionViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2023-09-01")] + public partial class InvokeAzOracleActionDbNode_ActionViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// DbNode action object + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNodeAction _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.DbNodeAction(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Db action + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db action")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Start", "Stop", "SoftReset", "Reset")] + public string Action { get => _body.Action ?? null; set => _body.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzOracleActionDbNode_ActionViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleActionDbNode_ActionViaIdentityExpanded Clone() + { + var clone = new InvokeAzOracleActionDbNode_ActionViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzOracleActionDbNode_ActionViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbNodesActionViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbnodeocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbnodeocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbNodesAction(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, InputObject.Dbnodeocid ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonFilePath.cs new file mode 100644 index 000000000000..1f2602142f38 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonFilePath.cs @@ -0,0 +1,621 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleActionDbNode_ActionViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class InvokeAzOracleActionDbNode_ActionViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Action operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Action operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Action operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzOracleActionDbNode_ActionViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleActionDbNode_ActionViaJsonFilePath Clone() + { + var clone = new InvokeAzOracleActionDbNode_ActionViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Dbnodeocid = this.Dbnodeocid; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzOracleActionDbNode_ActionViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesActionViaJsonString(SubscriptionId, ResourceGroupName, Cloudvmclustername, Dbnodeocid, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Dbnodeocid=Dbnodeocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonString.cs new file mode 100644 index 000000000000..2d6c6ac83dc1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleActionDbNode_ActionViaJsonString.cs @@ -0,0 +1,619 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleActionDbNode_ActionViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class InvokeAzOracleActionDbNode_ActionViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Action operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Action operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Action operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of InvokeAzOracleActionDbNode_ActionViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleActionDbNode_ActionViaJsonString Clone() + { + var clone = new InvokeAzOracleActionDbNode_ActionViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Dbnodeocid = this.Dbnodeocid; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzOracleActionDbNode_ActionViaJsonString() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesActionViaJsonString(SubscriptionId, ResourceGroupName, Cloudvmclustername, Dbnodeocid, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Dbnodeocid=Dbnodeocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded.cs new file mode 100644 index 000000000000..a57f0e5564f8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2023-09-01")] + public partial class InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// PeerDb Details + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PeerDbDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _body.PeerDbId ?? null; set => _body.PeerDbId = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded Clone() + { + var clone = new InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesSwitchover(SubscriptionId, ResourceGroupName, Autonomousdatabasename, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded.cs new file mode 100644 index 000000000000..803a3dce63e8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded.cs @@ -0,0 +1,588 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2023-09-01")] + public partial class InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// PeerDb Details + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IPeerDbDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.PeerDbDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _body.PeerDbId ?? null; set => _body.PeerDbId = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded Clone() + { + var clone = new InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesSwitchoverViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesSwitchover(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath.cs new file mode 100644 index 000000000000..74ca69a17603 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Switchover operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Switchover operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Switchover operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath Clone() + { + var clone = new InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the + /// cmdlet class. + /// + public InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesSwitchoverViaJsonString(SubscriptionId, ResourceGroupName, Autonomousdatabasename, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString.cs new file mode 100644 index 000000000000..6aa02411da3b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Switchover operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Switchover operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Switchover operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString Clone() + { + var clone = new InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public InvokeAzOracleSwitchoverAutonomousDatabase_SwitchoverViaJsonString() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesSwitchoverViaJsonString(SubscriptionId, ResourceGroupName, Autonomousdatabasename, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateExpanded.cs new file mode 100644 index 000000000000..059c3922330f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateExpanded.cs @@ -0,0 +1,630 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a AutonomousDatabaseBackup + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleAutonomousDatabaseBackup_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + public partial class NewAzOracleAutonomousDatabaseBackup_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// AutonomousDatabaseBackup resource definition + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseBackup(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the backup. The name does not have to be unique. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the backup. The name does not have to be unique.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Retention period, in days, for long-term backups. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for long-term backups.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int RetentionPeriodInDay { get => _resourceBody.RetentionPeriodInDay ?? default(int); set => _resourceBody.RetentionPeriodInDay = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleAutonomousDatabaseBackup_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleAutonomousDatabaseBackup_CreateExpanded Clone() + { + var clone = new NewAzOracleAutonomousDatabaseBackup_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Adbbackupid = this.Adbbackupid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleAutonomousDatabaseBackup_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsCreateOrUpdate(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..cfc2146b21c4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath.cs @@ -0,0 +1,623 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a AutonomousDatabaseBackup + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath Clone() + { + var clone = new NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Adbbackupid = this.Adbbackupid; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleAutonomousDatabaseBackup_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString.cs new file mode 100644 index 000000000000..1d75e82924d1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString.cs @@ -0,0 +1,619 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a AutonomousDatabaseBackup + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleAutonomousDatabaseBackup_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString Clone() + { + var clone = new NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Adbbackupid = this.Adbbackupid; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleAutonomousDatabaseBackup_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateExpanded.cs new file mode 100644 index 000000000000..9a2096d2ca13 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateExpanded.cs @@ -0,0 +1,978 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a AutonomousDatabase + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleAutonomousDatabase_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + public partial class NewAzOracleAutonomousDatabase_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// Autonomous Database resource model. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabase(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Admin password. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Admin password.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdminPassword { get => _resourceBody.AdminPassword ?? null; set => _resourceBody.AdminPassword = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Autonomous Database ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Autonomous Database ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Autonomous Database ID", + SerializedName = @"autonomousDatabaseId", + PossibleTypes = new [] { typeof(string) })] + public string AutonomousDatabaseId { get => _resourceBody.AutonomousDatabaseId ?? null; set => _resourceBody.AutonomousDatabaseId = value; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance schedule type of the Autonomous Database Serverless.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + public string AutonomousMaintenanceScheduleType { get => _resourceBody.AutonomousMaintenanceScheduleType ?? null; set => _resourceBody.AutonomousMaintenanceScheduleType = value; } + + /// Retention period, in days, for long-term backups + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for long-term backups")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int BackupRetentionPeriodInDay { get => _resourceBody.BackupRetentionPeriodInDay ?? default(int); set => _resourceBody.BackupRetentionPeriodInDay = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The character set for the autonomous database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The character set for the autonomous database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the autonomous database.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + public string CharacterSet { get => _resourceBody.CharacterSet ?? null; set => _resourceBody.CharacterSet = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The compute amount (CPUs) available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute amount (CPUs) available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + public float ComputeCount { get => _resourceBody.ComputeCount ?? default(float); set => _resourceBody.ComputeCount = value; } + + /// The compute model of the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute model of the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute model of the Autonomous Database.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ECPU", "OCPU")] + public string ComputeModel { get => _resourceBody.ComputeModel ?? null; set => _resourceBody.ComputeModel = value; } + + /// The number of CPU cores to be made available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores to be made available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _resourceBody.CpuCoreCount ?? default(int); set => _resourceBody.CpuCoreCount = value; } + + /// Customer Contacts. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Customer Contacts.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] CustomerContact { get => _resourceBody.CustomerContact?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.CustomerContact = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Database type to be created. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Database type to be created.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database type to be created.", + SerializedName = @"dataBaseType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Regular", "Clone")] + public string DataBaseType { get => _resourceBody.DataBaseType ?? null; set => _resourceBody.DataBaseType = value; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size, in gigabytes, of the data volume that will be created and attached to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInGb { get => _resourceBody.DataStorageSizeInGb ?? default(int); set => _resourceBody.DataStorageSizeInGb = value; } + + /// The quantity of data in the database, in terabytes. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The quantity of data in the database, in terabytes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInTb { get => _resourceBody.DataStorageSizeInTb ?? default(int); set => _resourceBody.DataStorageSizeInTb = value; } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle Database Edition that applies to the Autonomous databases.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + public string DatabaseEdition { get => _resourceBody.DatabaseEdition ?? null; set => _resourceBody.DatabaseEdition = value; } + + /// Name of the day of the week. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the day of the week.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + public string DayOfWeekName { get => _resourceBody.DayOfWeekName ?? null; set => _resourceBody.DayOfWeekName = value; } + + /// A valid Oracle Database version for Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A valid Oracle Database version for Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + public string DbVersion { get => _resourceBody.DbVersion ?? null; set => _resourceBody.DbVersion = value; } + + /// The Autonomous Database workload type + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Autonomous Database workload type")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OLTP", "DW", "AJD", "APEX")] + public string DbWorkload { get => _resourceBody.DbWorkload ?? null; set => _resourceBody.DbWorkload = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database CPU core count.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingEnabled { get => _resourceBody.IsAutoScalingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsAutoScalingEnabled = value; } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingForStorageEnabled { get => _resourceBody.IsAutoScalingForStorageEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsAutoScalingForStorageEnabled = value; } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalDataGuardEnabled { get => _resourceBody.IsLocalDataGuardEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsLocalDataGuardEnabled = value; } + + /// Specifies if the Autonomous Database requires mTLS connections. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database requires mTLS connections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsMtlsConnectionRequired { get => _resourceBody.IsMtlsConnectionRequired ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsMtlsConnectionRequired = value; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database preview version is being provisioned.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database preview version is being provisioned.", + SerializedName = @"isPreviewVersionWithServiceTermsAccepted", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsPreviewVersionWithServiceTermsAccepted { get => _resourceBody.IsPreviewVersionWithServiceTermsAccepted ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsPreviewVersionWithServiceTermsAccepted = value; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + public string LicenseModel { get => _resourceBody.LicenseModel ?? null; set => _resourceBody.LicenseModel = value; } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// The character set for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The character set for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the Autonomous Database.", + SerializedName = @"ncharacterSet", + PossibleTypes = new [] { typeof(string) })] + public string NcharacterSet { get => _resourceBody.NcharacterSet ?? null; set => _resourceBody.NcharacterSet = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The private endpoint Ip address for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The private endpoint Ip address for the resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The private endpoint Ip address for the resource.", + SerializedName = @"privateEndpointIp", + PossibleTypes = new [] { typeof(string) })] + public string PrivateEndpointIP { get => _resourceBody.PrivateEndpointIP ?? null; set => _resourceBody.PrivateEndpointIP = value; } + + /// The resource's private endpoint label. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource's private endpoint label.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource's private endpoint label.", + SerializedName = @"privateEndpointLabel", + PossibleTypes = new [] { typeof(string) })] + public string PrivateEndpointLabel { get => _resourceBody.PrivateEndpointLabel ?? null; set => _resourceBody.PrivateEndpointLabel = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto start time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledStartTime { get => _resourceBody.ScheduledOperationScheduledStartTime ?? null; set => _resourceBody.ScheduledOperationScheduledStartTime = value; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto stop time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledStopTime { get => _resourceBody.ScheduledOperationScheduledStopTime ?? null; set => _resourceBody.ScheduledOperationScheduledStopTime = value; } + + /// Client subnet + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client subnet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + public string SubnetId { get => _resourceBody.SubnetId ?? null; set => _resourceBody.SubnetId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// VNET for network connectivity + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "VNET for network connectivity")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + public string VnetId { get => _resourceBody.VnetId ?? null; set => _resourceBody.VnetId = value; } + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + public string[] WhitelistedIP { get => _resourceBody.WhitelistedIP?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.WhitelistedIP = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleAutonomousDatabase_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleAutonomousDatabase_CreateExpanded Clone() + { + var clone = new NewAzOracleAutonomousDatabase_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleAutonomousDatabase_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..9b3d932d76c7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonFilePath.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a AutonomousDatabase + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleAutonomousDatabase_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleAutonomousDatabase_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleAutonomousDatabase_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleAutonomousDatabase_CreateViaJsonFilePath Clone() + { + var clone = new NewAzOracleAutonomousDatabase_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleAutonomousDatabase_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonString.cs new file mode 100644 index 000000000000..d3059568766b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleAutonomousDatabase_CreateViaJsonString.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a AutonomousDatabase + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleAutonomousDatabase_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleAutonomousDatabase_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleAutonomousDatabase_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleAutonomousDatabase_CreateViaJsonString Clone() + { + var clone = new NewAzOracleAutonomousDatabase_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleAutonomousDatabase_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateExpanded.cs new file mode 100644 index 000000000000..6b9f7228a9f3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateExpanded.cs @@ -0,0 +1,826 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a CloudExadataInfrastructure + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleCloudExadataInfrastructure_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + public partial class NewAzOracleCloudExadataInfrastructure_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// CloudExadataInfrastructure resource definition + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructure(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The number of compute servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of compute servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + public int ComputeCount { get => _resourceBody.ComputeCount ?? default(int); set => _resourceBody.ComputeCount = value; } + + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] CustomerContact { get => _resourceBody.CustomerContact?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.CustomerContact = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The name for the Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name for the Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowCustomActionTimeoutInMin { get => _resourceBody.MaintenanceWindowCustomActionTimeoutInMin ?? default(int); set => _resourceBody.MaintenanceWindowCustomActionTimeoutInMin = value; } + + /// Days during the week when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Days during the week when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => _resourceBody.MaintenanceWindowDaysOfWeek?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.MaintenanceWindowDaysOfWeek = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowHoursOfDay { get => _resourceBody.MaintenanceWindowHoursOfDay?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.MaintenanceWindowHoursOfDay = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsCustomActionTimeoutEnabled { get => _resourceBody.MaintenanceWindowIsCustomActionTimeoutEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.MaintenanceWindowIsCustomActionTimeoutEnabled = value; } + + /// is Monthly Patching Enabled + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "is Monthly Patching Enabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsMonthlyPatchingEnabled { get => _resourceBody.MaintenanceWindowIsMonthlyPatchingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.MaintenanceWindowIsMonthlyPatchingEnabled = value; } + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowLeadTimeInWeek { get => _resourceBody.MaintenanceWindowLeadTimeInWeek ?? default(int); set => _resourceBody.MaintenanceWindowLeadTimeInWeek = value; } + + /// Months during the year when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Months during the year when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[] MaintenanceWindowMonth { get => _resourceBody.MaintenanceWindowMonth?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.MaintenanceWindowMonth = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Cloud Exadata infrastructure node patching method. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata infrastructure node patching method.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + public string MaintenanceWindowPatchingMode { get => _resourceBody.MaintenanceWindowPatchingMode ?? null; set => _resourceBody.MaintenanceWindowPatchingMode = value; } + + /// The maintenance window scheduling preference. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance window scheduling preference.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + public string MaintenanceWindowPreference { get => _resourceBody.MaintenanceWindowPreference ?? null; set => _resourceBody.MaintenanceWindowPreference = value; } + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowWeeksOfMonth { get => _resourceBody.MaintenanceWindowWeeksOfMonth?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.MaintenanceWindowWeeksOfMonth = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The model name of the cloud Exadata infrastructure resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The model name of the cloud Exadata infrastructure resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The model name of the cloud Exadata infrastructure resource.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + public string Shape { get => _resourceBody.Shape ?? null; set => _resourceBody.Shape = value; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of storage servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + public int StorageCount { get => _resourceBody.StorageCount ?? default(int); set => _resourceBody.StorageCount = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// CloudExadataInfrastructure zones + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure zones")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _resourceBody.Zone?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.Zone = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleCloudExadataInfrastructure_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleCloudExadataInfrastructure_CreateExpanded Clone() + { + var clone = new NewAzOracleCloudExadataInfrastructure_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleCloudExadataInfrastructure_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..32ef273a42dd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a CloudExadataInfrastructure + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleCloudExadataInfrastructure_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath Clone() + { + var clone = new NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleCloudExadataInfrastructure_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonString.cs new file mode 100644 index 000000000000..b9c73739a5a2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudExadataInfrastructure_CreateViaJsonString.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a CloudExadataInfrastructure + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleCloudExadataInfrastructure_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleCloudExadataInfrastructure_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleCloudExadataInfrastructure_CreateViaJsonString + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleCloudExadataInfrastructure_CreateViaJsonString Clone() + { + var clone = new NewAzOracleCloudExadataInfrastructure_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleCloudExadataInfrastructure_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateExpanded.cs new file mode 100644 index 000000000000..4f1492d7f8b9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateExpanded.cs @@ -0,0 +1,969 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a CloudVmCluster + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleCloudVMCluster_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + public partial class NewAzOracleCloudVMCluster_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// CloudVmCluster resource definition + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMCluster(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client OCI backup subnet CIDR, default is 192.168.252.0/22")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + public string BackupSubnetCidr { get => _resourceBody.BackupSubnetCidr ?? null; set => _resourceBody.BackupSubnetCidr = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Cloud Exadata Infrastructure ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata Infrastructure ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata Infrastructure ID", + SerializedName = @"cloudExadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + public string CloudExadataInfrastructureId { get => _resourceBody.CloudExadataInfrastructureId ?? null; set => _resourceBody.CloudExadataInfrastructureId = value; } + + /// + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens + /// (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. ", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + public string ClusterName { get => _resourceBody.ClusterName ?? null; set => _resourceBody.ClusterName = value; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores enabled on the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _resourceBody.CpuCoreCount ?? default(int); set => _resourceBody.CpuCoreCount = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsDiagnosticsEventsEnabled { get => _resourceBody.DataCollectionOptionIsDiagnosticsEventsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsDiagnosticsEventsEnabled = value; } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsHealthMonitoringEnabled { get => _resourceBody.DataCollectionOptionIsHealthMonitoringEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsHealthMonitoringEnabled = value; } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsIncidentLogsEnabled { get => _resourceBody.DataCollectionOptionIsIncidentLogsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsIncidentLogsEnabled = value; } + + /// + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage + /// (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is + /// 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in + /// the Exadata documentation for details on the impact of the configuration settings on storage. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. ", + SerializedName = @"dataStoragePercentage", + PossibleTypes = new [] { typeof(int) })] + public int DataStoragePercentage { get => _resourceBody.DataStoragePercentage ?? default(int); set => _resourceBody.DataStoragePercentage = value; } + + /// The data disk group size to be allocated in TBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in TBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + public double DataStorageSizeInTb { get => _resourceBody.DataStorageSizeInTb ?? default(double); set => _resourceBody.DataStorageSizeInTb = value; } + + /// The local node storage to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The local node storage to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DbNodeStorageSizeInGb { get => _resourceBody.DbNodeStorageSizeInGb ?? default(int); set => _resourceBody.DbNodeStorageSizeInGb = value; } + + /// The list of DB servers. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of DB servers.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of DB servers.", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _resourceBody.DbServer?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.DbServer = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Display Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Display Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// The domain name for the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The domain name for the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The domain name for the cloud VM cluster.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + public string Domain { get => _resourceBody.Domain ?? null; set => _resourceBody.Domain = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// Oracle Grid Infrastructure (GI) software version + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Oracle Grid Infrastructure (GI) software version")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + public string GiVersion { get => _resourceBody.GiVersion ?? null; set => _resourceBody.GiVersion = value; } + + /// The hostname for the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The hostname for the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The hostname for the cloud VM cluster.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + public string Hostname { get => _resourceBody.Hostname ?? null; set => _resourceBody.Hostname = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on + /// local Exadata storage is not available in the cloud VM cluster. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. ", + SerializedName = @"isLocalBackupEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalBackupEnabled { get => _resourceBody.IsLocalBackupEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsLocalBackupEnabled = value; } + + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ", + SerializedName = @"isSparseDiskgroupEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsSparseDiskgroupEnabled { get => _resourceBody.IsSparseDiskgroupEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsSparseDiskgroupEnabled = value; } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + public string LicenseModel { get => _resourceBody.LicenseModel ?? null; set => _resourceBody.LicenseModel = value; } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// The memory to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The memory to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int MemorySizeInGb { get => _resourceBody.MemorySizeInGb ?? default(int); set => _resourceBody.MemorySizeInGb = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr[] NsgCidr { get => _resourceBody.NsgCidr?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.NsgCidr = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + public float OcpuCount { get => _resourceBody.OcpuCount ?? default(float); set => _resourceBody.OcpuCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The TCP Single Client Access Name (SCAN) port. The default port is 1521.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + public int ScanListenerPortTcp { get => _resourceBody.ScanListenerPortTcp ?? default(int); set => _resourceBody.ScanListenerPortTcp = value; } + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The TCPS Single Client Access Name (SCAN) port. The default port is 2484.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + public int ScanListenerPortTcpSsl { get => _resourceBody.ScanListenerPortTcpSsl ?? default(int); set => _resourceBody.ScanListenerPortTcpSsl = value; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + public string[] SshPublicKey { get => _resourceBody.SshPublicKey?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.SshPublicKey = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Client subnet + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client subnet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + public string SubnetId { get => _resourceBody.SubnetId ?? null; set => _resourceBody.SubnetId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Operating system version of the image. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system version of the image.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + public string SystemVersion { get => _resourceBody.SystemVersion ?? null; set => _resourceBody.SystemVersion = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + public string TimeZone { get => _resourceBody.TimeZone ?? null; set => _resourceBody.TimeZone = value; } + + /// VNET for network connectivity + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "VNET for network connectivity")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + public string VnetId { get => _resourceBody.VnetId ?? null; set => _resourceBody.VnetId = value; } + + /// The OCID of the zone the cloud VM cluster is associated with. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The OCID of the zone the cloud VM cluster is associated with.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the zone the cloud VM cluster is associated with.", + SerializedName = @"zoneId", + PossibleTypes = new [] { typeof(string) })] + public string ZoneId { get => _resourceBody.ZoneId ?? null; set => _resourceBody.ZoneId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleCloudVMCluster_CreateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleCloudVMCluster_CreateExpanded Clone() + { + var clone = new NewAzOracleCloudVMCluster_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleCloudVMCluster_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeCreate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..2233daab8d9c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonFilePath.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a CloudVmCluster + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleCloudVMCluster_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleCloudVMCluster_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleCloudVMCluster_CreateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleCloudVMCluster_CreateViaJsonFilePath Clone() + { + var clone = new NewAzOracleCloudVMCluster_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleCloudVMCluster_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonString.cs new file mode 100644 index 000000000000..7a44869dfe40 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/NewAzOracleCloudVMCluster_CreateViaJsonString.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Create a CloudVmCluster + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleCloudVMCluster_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Create a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class NewAzOracleCloudVMCluster_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzOracleCloudVMCluster_CreateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.NewAzOracleCloudVMCluster_CreateViaJsonString Clone() + { + var clone = new NewAzOracleCloudVMCluster_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzOracleCloudVMCluster_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_Delete.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_Delete.cs new file mode 100644 index 000000000000..f1e0b82eae7e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_Delete.cs @@ -0,0 +1,625 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a AutonomousDatabaseBackup + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleAutonomousDatabaseBackup_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleAutonomousDatabaseBackup_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleAutonomousDatabaseBackup_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleAutonomousDatabaseBackup_Delete Clone() + { + var clone = new RemoveAzOracleAutonomousDatabaseBackup_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Adbbackupid = this.Adbbackupid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsDelete(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleAutonomousDatabaseBackup_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity.cs new file mode 100644 index 000000000000..8c1fd6eb6919 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a AutonomousDatabaseBackup + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleAutonomousDatabaseBackup_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseBackupsDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbbackupid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbbackupid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseBackupsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, InputObject.Adbbackupid ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase.cs new file mode 100644 index 000000000000..fb6eea4a4eaf --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a AutonomousDatabaseBackup + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _autonomousDatabaseInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity AutonomousDatabaseInputObject { get => this._autonomousDatabaseInputObject; set => this._autonomousDatabaseInputObject = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase Clone() + { + var clone = new RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Adbbackupid = this.Adbbackupid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (AutonomousDatabaseInputObject?.Id != null) + { + this.AutonomousDatabaseInputObject.Id += $"/autonomousDatabaseBackups/{(global::System.Uri.EscapeDataString(this.Adbbackupid.ToString()))}"; + await this.Client.AutonomousDatabaseBackupsDeleteViaIdentity(AutonomousDatabaseInputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == AutonomousDatabaseInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AutonomousDatabaseInputObject has null value for AutonomousDatabaseInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AutonomousDatabaseInputObject) ); + } + if (null == AutonomousDatabaseInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AutonomousDatabaseInputObject has null value for AutonomousDatabaseInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AutonomousDatabaseInputObject) ); + } + if (null == AutonomousDatabaseInputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("AutonomousDatabaseInputObject has null value for AutonomousDatabaseInputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, AutonomousDatabaseInputObject) ); + } + await this.Client.AutonomousDatabaseBackupsDelete(AutonomousDatabaseInputObject.SubscriptionId ?? null, AutonomousDatabaseInputObject.ResourceGroupName ?? null, AutonomousDatabaseInputObject.Autonomousdatabasename ?? null, Adbbackupid, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleAutonomousDatabaseBackup_DeleteViaIdentityAutonomousDatabase() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_Delete.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_Delete.cs new file mode 100644 index 000000000000..2795fc94ce18 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_Delete.cs @@ -0,0 +1,611 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a AutonomousDatabase + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleAutonomousDatabase_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleAutonomousDatabase_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleAutonomousDatabase_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleAutonomousDatabase_Delete Clone() + { + var clone = new RemoveAzOracleAutonomousDatabase_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleAutonomousDatabase_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_DeleteViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_DeleteViaIdentity.cs new file mode 100644 index 000000000000..3aeca8d2ece0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleAutonomousDatabase_DeleteViaIdentity.cs @@ -0,0 +1,588 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a AutonomousDatabase + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleAutonomousDatabase_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleAutonomousDatabase_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleAutonomousDatabase_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleAutonomousDatabase_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleAutonomousDatabase_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleAutonomousDatabase_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_Delete.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_Delete.cs new file mode 100644 index 000000000000..92dfe14d7363 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_Delete.cs @@ -0,0 +1,611 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a CloudExadataInfrastructure + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudExadataInfrastructure_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudExadataInfrastructure_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudExadataInfrastructure_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudExadataInfrastructure_Delete Clone() + { + var clone = new RemoveAzOracleCloudExadataInfrastructure_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudExadataInfrastructure_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity.cs new file mode 100644 index 000000000000..e086aabd9c81 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity.cs @@ -0,0 +1,590 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a CloudExadataInfrastructure + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudExadataInfrastructure_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudExadataInfrastructuresDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudExadataInfrastructuresDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudExadataInfrastructure_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_Remove.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_Remove.cs new file mode 100644 index 000000000000..a1d1d0278614 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_Remove.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMClusterVM_Remove", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudVMClusterVM_Remove : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode _body; + + /// Add/Remove (Virtual Machine) DbNode model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Add/Remove (Virtual Machine) DbNode model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Add/Remove (Virtual Machine) DbNode model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudVMClusterVM_Remove + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMClusterVM_Remove Clone() + { + var clone = new RemoveAzOracleCloudVMClusterVM_Remove(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersRemoveVms(SubscriptionId, ResourceGroupName, Cloudvmclustername, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMClusterVM_Remove() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveExpanded.cs new file mode 100644 index 000000000000..5b65a9681137 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveExpanded.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMClusterVM_RemoveExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudVMClusterVM_RemoveExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer?.ToArray() ?? null /* fixedArrayOf */; set => _body.DbServer = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudVMClusterVM_RemoveExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMClusterVM_RemoveExpanded Clone() + { + var clone = new RemoveAzOracleCloudVMClusterVM_RemoveExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersRemoveVms(SubscriptionId, ResourceGroupName, Cloudvmclustername, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMClusterVM_RemoveExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity.cs new file mode 100644 index 000000000000..fbf452337228 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity.cs @@ -0,0 +1,582 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMClusterVM_RemoveViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode _body; + + /// Add/Remove (Virtual Machine) DbNode model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Add/Remove (Virtual Machine) DbNode model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Add/Remove (Virtual Machine) DbNode model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity Clone() + { + var clone = new RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersRemoveVmsViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersRemoveVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMClusterVM_RemoveViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded.cs new file mode 100644 index 000000000000..e456b90fea4f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded.cs @@ -0,0 +1,585 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMClusterVM_RemoveViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer?.ToArray() ?? null /* fixedArrayOf */; set => _body.DbServer = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded Clone() + { + var clone = new RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersRemoveVmsViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersRemoveVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMClusterVM_RemoveViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath.cs new file mode 100644 index 000000000000..f58691382185 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath.cs @@ -0,0 +1,606 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMClusterVM_RemoveViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Remove operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Remove operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Remove operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath Clone() + { + var clone = new RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersRemoveVmsViaJsonString(SubscriptionId, ResourceGroupName, Cloudvmclustername, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMClusterVM_RemoveViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString.cs new file mode 100644 index 000000000000..716916da86b7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString.cs @@ -0,0 +1,604 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMClusterVM_RemoveViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Remove operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Remove operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Remove operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString Clone() + { + var clone = new RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersRemoveVmsViaJsonString(SubscriptionId, ResourceGroupName, Cloudvmclustername, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMClusterVM_RemoveViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_Delete.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_Delete.cs new file mode 100644 index 000000000000..f07b1732e03f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_Delete.cs @@ -0,0 +1,611 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a CloudVmCluster + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMCluster_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudVMCluster_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudVMCluster_Delete + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMCluster_Delete Clone() + { + var clone = new RemoveAzOracleCloudVMCluster_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMCluster_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_DeleteViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_DeleteViaIdentity.cs new file mode 100644 index 000000000000..efa9a1252ba5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RemoveAzOracleCloudVMCluster_DeleteViaIdentity.cs @@ -0,0 +1,588 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Delete a CloudVmCluster + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleCloudVMCluster_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Delete a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + public partial class RemoveAzOracleCloudVMCluster_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzOracleCloudVMCluster_DeleteViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RemoveAzOracleCloudVMCluster_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleCloudVMCluster_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzOracleCloudVMCluster_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_Restore.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_Restore.cs new file mode 100644 index 000000000000..03167bb9a840 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_Restore.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleAutonomousDatabase_Restore", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2023-09-01")] + public partial class RestoreAzOracleAutonomousDatabase_Restore : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails _body; + + /// Details to restore an Oracle Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Details to restore an Oracle Autonomous Database.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Details to restore an Oracle Autonomous Database.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RestoreAzOracleAutonomousDatabase_Restore + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RestoreAzOracleAutonomousDatabase_Restore Clone() + { + var clone = new RestoreAzOracleAutonomousDatabase_Restore(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesRestore(SubscriptionId, ResourceGroupName, Name, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RestoreAzOracleAutonomousDatabase_Restore() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreExpanded.cs new file mode 100644 index 000000000000..a7ba9e3bd6ce --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreExpanded.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleAutonomousDatabase_RestoreExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2023-09-01")] + public partial class RestoreAzOracleAutonomousDatabase_RestoreExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Details to restore an Oracle Autonomous Database. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.RestoreAutonomousDatabaseDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// The time to restore the database to. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to restore the database to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The time to restore the database to.", + SerializedName = @"timestamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime Timestamp { get => _body.Timestamp; set => _body.Timestamp = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RestoreAzOracleAutonomousDatabase_RestoreExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RestoreAzOracleAutonomousDatabase_RestoreExpanded Clone() + { + var clone = new RestoreAzOracleAutonomousDatabase_RestoreExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesRestore(SubscriptionId, ResourceGroupName, Name, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RestoreAzOracleAutonomousDatabase_RestoreExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentity.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentity.cs new file mode 100644 index 000000000000..8df0cc94b766 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentity.cs @@ -0,0 +1,582 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleAutonomousDatabase_RestoreViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2023-09-01")] + public partial class RestoreAzOracleAutonomousDatabase_RestoreViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails _body; + + /// Details to restore an Oracle Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Details to restore an Oracle Autonomous Database.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Details to restore an Oracle Autonomous Database.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RestoreAzOracleAutonomousDatabase_RestoreViaIdentity + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RestoreAzOracleAutonomousDatabase_RestoreViaIdentity Clone() + { + var clone = new RestoreAzOracleAutonomousDatabase_RestoreViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesRestoreViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesRestore(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RestoreAzOracleAutonomousDatabase_RestoreViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded.cs new file mode 100644 index 000000000000..372c16a9f4de --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded.cs @@ -0,0 +1,584 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleAutonomousDatabase_RestoreViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2023-09-01")] + public partial class RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Details to restore an Oracle Autonomous Database. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.RestoreAutonomousDatabaseDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The time to restore the database to. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to restore the database to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The time to restore the database to.", + SerializedName = @"timestamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime Timestamp { get => _body.Timestamp; set => _body.Timestamp = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded Clone() + { + var clone = new RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesRestoreViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesRestore(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RestoreAzOracleAutonomousDatabase_RestoreViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath.cs new file mode 100644 index 000000000000..70070cbefd19 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath.cs @@ -0,0 +1,609 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleAutonomousDatabase_RestoreViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Restore operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Restore operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Restore operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath Clone() + { + var clone = new RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesRestoreViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RestoreAzOracleAutonomousDatabase_RestoreViaJsonFilePath() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonString.cs new file mode 100644 index 000000000000..3fb8168fac3d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/RestoreAzOracleAutonomousDatabase_RestoreViaJsonString.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleAutonomousDatabase_RestoreViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class RestoreAzOracleAutonomousDatabase_RestoreViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Restore operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Restore operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Restore operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RestoreAzOracleAutonomousDatabase_RestoreViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.RestoreAzOracleAutonomousDatabase_RestoreViaJsonString Clone() + { + var clone = new RestoreAzOracleAutonomousDatabase_RestoreViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesRestoreViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RestoreAzOracleAutonomousDatabase_RestoreViaJsonString() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateExpanded.cs new file mode 100644 index 000000000000..46f711cf598e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateExpanded.cs @@ -0,0 +1,948 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a AutonomousDatabase + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleAutonomousDatabase_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + public partial class UpdateAzOracleAutonomousDatabase_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the AutonomousDatabase. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Admin password. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Admin password.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdminPassword { get => _propertiesBody.AdminPassword ?? null; set => _propertiesBody.AdminPassword = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance schedule type of the Autonomous Database Serverless.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + public string AutonomousMaintenanceScheduleType { get => _propertiesBody.AutonomousMaintenanceScheduleType ?? null; set => _propertiesBody.AutonomousMaintenanceScheduleType = value; } + + /// Retention period, in days, for long-term backups + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for long-term backups")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int BackupRetentionPeriodInDay { get => _propertiesBody.BackupRetentionPeriodInDay ?? default(int); set => _propertiesBody.BackupRetentionPeriodInDay = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The compute amount (CPUs) available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute amount (CPUs) available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + public float ComputeCount { get => _propertiesBody.ComputeCount ?? default(float); set => _propertiesBody.ComputeCount = value; } + + /// The number of CPU cores to be made available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores to be made available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// Customer Contacts. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Customer Contacts.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.CustomerContact = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size, in gigabytes, of the data volume that will be created and attached to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInGb { get => _propertiesBody.DataStorageSizeInGb ?? default(int); set => _propertiesBody.DataStorageSizeInGb = value; } + + /// The quantity of data in the database, in terabytes. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The quantity of data in the database, in terabytes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(int); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle Database Edition that applies to the Autonomous databases.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + public string DatabaseEdition { get => _propertiesBody.DatabaseEdition ?? null; set => _propertiesBody.DatabaseEdition = value; } + + /// Name of the day of the week. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the day of the week.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + public string DayOfWeekName { get => _propertiesBody.DayOfWeekName ?? null; set => _propertiesBody.DayOfWeekName = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database CPU core count.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingEnabled { get => _propertiesBody.IsAutoScalingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingEnabled = value; } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingForStorageEnabled { get => _propertiesBody.IsAutoScalingForStorageEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingForStorageEnabled = value; } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalDataGuardEnabled { get => _propertiesBody.IsLocalDataGuardEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsLocalDataGuardEnabled = value; } + + /// Specifies if the Autonomous Database requires mTLS connections. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database requires mTLS connections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsMtlsConnectionRequired { get => _propertiesBody.IsMtlsConnectionRequired ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsMtlsConnectionRequired = value; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + public string LicenseModel { get => _propertiesBody.LicenseModel ?? null; set => _propertiesBody.LicenseModel = value; } + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + public int LocalAdgAutoFailoverMaxDataLossLimit { get => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit ?? default(int); set => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter LongTermBackupScheduleIsDisabled { get => _propertiesBody.LongTermBackupScheduleIsDisabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.LongTermBackupScheduleIsDisabled = value; } + + /// The frequency of the long-term backup schedule + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The frequency of the long-term backup schedule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + public string LongTermBackupScheduleRepeatCadence { get => _propertiesBody.LongTermBackupScheduleRepeatCadence ?? null; set => _propertiesBody.LongTermBackupScheduleRepeatCadence = value; } + + /// Retention period, in days, for backups. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for backups.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int LongTermBackupScheduleRetentionPeriodInDay { get => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay ?? default(int); set => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay = value; } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime LongTermBackupScheduleTimeOfBackup { get => _propertiesBody.LongTermBackupScheduleTimeOfBackup ?? default(global::System.DateTime); set => _propertiesBody.LongTermBackupScheduleTimeOfBackup = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Indicates the Autonomous Database mode. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the Autonomous Database mode.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + public string OpenMode { get => _propertiesBody.OpenMode ?? null; set => _propertiesBody.OpenMode = value; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _propertiesBody.PeerDbId ?? null; set => _propertiesBody.PeerDbId = value; } + + /// The Autonomous Database permission level. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Autonomous Database permission level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + public string PermissionLevel { get => _propertiesBody.PermissionLevel ?? null; set => _propertiesBody.PermissionLevel = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + public string Role { get => _propertiesBody.Role ?? null; set => _propertiesBody.Role = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto start time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledStartTime { get => _propertiesBody.ScheduledOperationScheduledStartTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStartTime = value; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto stop time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledStopTime { get => _propertiesBody.ScheduledOperationScheduledStopTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStopTime = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + public string[] WhitelistedIP { get => _propertiesBody.WhitelistedIP?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.WhitelistedIP = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleAutonomousDatabase_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleAutonomousDatabase_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleAutonomousDatabase_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleAutonomousDatabase_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..3a6d36678306 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded.cs @@ -0,0 +1,927 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a AutonomousDatabase + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleAutonomousDatabase_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + public partial class UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the AutonomousDatabase. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.AutonomousDatabaseUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Admin password. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Admin password.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdminPassword { get => _propertiesBody.AdminPassword ?? null; set => _propertiesBody.AdminPassword = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance schedule type of the Autonomous Database Serverless.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Early", "Regular")] + public string AutonomousMaintenanceScheduleType { get => _propertiesBody.AutonomousMaintenanceScheduleType ?? null; set => _propertiesBody.AutonomousMaintenanceScheduleType = value; } + + /// Retention period, in days, for long-term backups + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for long-term backups")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int BackupRetentionPeriodInDay { get => _propertiesBody.BackupRetentionPeriodInDay ?? default(int); set => _propertiesBody.BackupRetentionPeriodInDay = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The compute amount (CPUs) available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute amount (CPUs) available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + public float ComputeCount { get => _propertiesBody.ComputeCount ?? default(float); set => _propertiesBody.ComputeCount = value; } + + /// The number of CPU cores to be made available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores to be made available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// Customer Contacts. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Customer Contacts.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.CustomerContact = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size, in gigabytes, of the data volume that will be created and attached to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInGb { get => _propertiesBody.DataStorageSizeInGb ?? default(int); set => _propertiesBody.DataStorageSizeInGb = value; } + + /// The quantity of data in the database, in terabytes. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The quantity of data in the database, in terabytes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(int); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle Database Edition that applies to the Autonomous databases.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("StandardEdition", "EnterpriseEdition")] + public string DatabaseEdition { get => _propertiesBody.DatabaseEdition ?? null; set => _propertiesBody.DatabaseEdition = value; } + + /// Name of the day of the week. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the day of the week.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")] + public string DayOfWeekName { get => _propertiesBody.DayOfWeekName ?? null; set => _propertiesBody.DayOfWeekName = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database CPU core count.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingEnabled { get => _propertiesBody.IsAutoScalingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingEnabled = value; } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingForStorageEnabled { get => _propertiesBody.IsAutoScalingForStorageEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingForStorageEnabled = value; } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalDataGuardEnabled { get => _propertiesBody.IsLocalDataGuardEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsLocalDataGuardEnabled = value; } + + /// Specifies if the Autonomous Database requires mTLS connections. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database requires mTLS connections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsMtlsConnectionRequired { get => _propertiesBody.IsMtlsConnectionRequired ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsMtlsConnectionRequired = value; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + public string LicenseModel { get => _propertiesBody.LicenseModel ?? null; set => _propertiesBody.LicenseModel = value; } + + /// + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover + /// will be triggered when necessary for a Local Autonomous Data Guard + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + public int LocalAdgAutoFailoverMaxDataLossLimit { get => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit ?? default(int); set => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter LongTermBackupScheduleIsDisabled { get => _propertiesBody.LongTermBackupScheduleIsDisabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.LongTermBackupScheduleIsDisabled = value; } + + /// The frequency of the long-term backup schedule + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The frequency of the long-term backup schedule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("OneTime", "Weekly", "Monthly", "Yearly")] + public string LongTermBackupScheduleRepeatCadence { get => _propertiesBody.LongTermBackupScheduleRepeatCadence ?? null; set => _propertiesBody.LongTermBackupScheduleRepeatCadence = value; } + + /// Retention period, in days, for backups. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for backups.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int LongTermBackupScheduleRetentionPeriodInDay { get => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay ?? default(int); set => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay = value; } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime LongTermBackupScheduleTimeOfBackup { get => _propertiesBody.LongTermBackupScheduleTimeOfBackup ?? default(global::System.DateTime); set => _propertiesBody.LongTermBackupScheduleTimeOfBackup = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Indicates the Autonomous Database mode. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the Autonomous Database mode.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("ReadOnly", "ReadWrite")] + public string OpenMode { get => _propertiesBody.OpenMode ?? null; set => _propertiesBody.OpenMode = value; } + + /// + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer + /// database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _propertiesBody.PeerDbId ?? null; set => _propertiesBody.PeerDbId = value; } + + /// The Autonomous Database permission level. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Autonomous Database permission level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Restricted", "Unrestricted")] + public string PermissionLevel { get => _propertiesBody.PermissionLevel ?? null; set => _propertiesBody.PermissionLevel = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Primary", "Standby", "DisabledStandby", "BackupCopy", "SnapshotStandby")] + public string Role { get => _propertiesBody.Role ?? null; set => _propertiesBody.Role = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto start time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledStartTime { get => _propertiesBody.ScheduledOperationScheduledStartTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStartTime = value; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto stop time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledStopTime { get => _propertiesBody.ScheduledOperationScheduledStopTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStopTime = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate + /// strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + public string[] WhitelistedIP { get => _propertiesBody.WhitelistedIP?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.WhitelistedIP = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleAutonomousDatabase_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..1fd3978b0e82 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a AutonomousDatabase + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleAutonomousDatabase_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleAutonomousDatabase_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonString.cs new file mode 100644 index 000000000000..b3d028431a31 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleAutonomousDatabase_UpdateViaJsonString.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a AutonomousDatabase + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleAutonomousDatabase_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class UpdateAzOracleAutonomousDatabase_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleAutonomousDatabase_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleAutonomousDatabase_UpdateViaJsonString Clone() + { + var clone = new UpdateAzOracleAutonomousDatabase_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleAutonomousDatabase_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded.cs new file mode 100644 index 000000000000..bdf188750f2c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded.cs @@ -0,0 +1,804 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudExadataInfrastructure + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudExadataInfrastructure_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + public partial class UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the CloudExadataInfrastructure. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The number of compute servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of compute servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + public int ComputeCount { get => _propertiesBody.ComputeCount ?? default(int); set => _propertiesBody.ComputeCount = value; } + + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.CustomerContact = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The name for the Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name for the Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowCustomActionTimeoutInMin { get => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin ?? default(int); set => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin = value; } + + /// Days during the week when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Days during the week when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => _propertiesBody.MaintenanceWindowDaysOfWeek?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowDaysOfWeek = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowHoursOfDay { get => _propertiesBody.MaintenanceWindowHoursOfDay?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowHoursOfDay = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsCustomActionTimeoutEnabled { get => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled = value; } + + /// is Monthly Patching Enabled + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "is Monthly Patching Enabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsMonthlyPatchingEnabled { get => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled = value; } + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowLeadTimeInWeek { get => _propertiesBody.MaintenanceWindowLeadTimeInWeek ?? default(int); set => _propertiesBody.MaintenanceWindowLeadTimeInWeek = value; } + + /// Months during the year when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Months during the year when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[] MaintenanceWindowMonth { get => _propertiesBody.MaintenanceWindowMonth?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowMonth = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Cloud Exadata infrastructure node patching method. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata infrastructure node patching method.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + public string MaintenanceWindowPatchingMode { get => _propertiesBody.MaintenanceWindowPatchingMode ?? null; set => _propertiesBody.MaintenanceWindowPatchingMode = value; } + + /// The maintenance window scheduling preference. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance window scheduling preference.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + public string MaintenanceWindowPreference { get => _propertiesBody.MaintenanceWindowPreference ?? null; set => _propertiesBody.MaintenanceWindowPreference = value; } + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowWeeksOfMonth { get => _propertiesBody.MaintenanceWindowWeeksOfMonth?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowWeeksOfMonth = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of storage servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + public int StorageCount { get => _propertiesBody.StorageCount ?? default(int); set => _propertiesBody.StorageCount = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// CloudExadataInfrastructure zones + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CloudExadataInfrastructure zones")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _propertiesBody.Zone?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.Zone = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleCloudExadataInfrastructure_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..bb690169858e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded.cs @@ -0,0 +1,784 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudExadataInfrastructure + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + public partial class UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the CloudExadataInfrastructure. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudExadataInfrastructureUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The number of compute servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of compute servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + public int ComputeCount { get => _propertiesBody.ComputeCount ?? default(int); set => _propertiesBody.ComputeCount = value; } + + /// + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. + /// Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information + /// about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer + /// contacts for a cloud Exadata infrastructure instance. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.CustomerContact = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The name for the Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name for the Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Determines the amount of time the system will wait before the start of each database server patching operation. Custom + /// action timeout is in minutes and valid value is between 15 to 120 (inclusive). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the amount of time the system will wait before the start of each database server patching operation. Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowCustomActionTimeoutInMin { get => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin ?? default(int); set => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin = value; } + + /// Days during the week when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Days during the week when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => _propertiesBody.MaintenanceWindowDaysOfWeek?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowDaysOfWeek = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are + /// - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 + /// - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents + /// time slot 20:00 - 23:59 UTC + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The window of hours during the day when maintenance should be performed. The window is a 4 hour slot. Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowHoursOfDay { get => _propertiesBody.MaintenanceWindowHoursOfDay?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowHoursOfDay = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsCustomActionTimeoutEnabled { get => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled = value; } + + /// is Monthly Patching Enabled + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "is Monthly Patching Enabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsMonthlyPatchingEnabled { get => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled = value; } + + /// + /// Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value + /// is between 1 to 4. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Lead time window allows user to set a lead time to prepare for a down time. The lead time is in weeks and valid value is between 1 to 4. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowLeadTimeInWeek { get => _propertiesBody.MaintenanceWindowLeadTimeInWeek ?? default(int); set => _propertiesBody.MaintenanceWindowLeadTimeInWeek = value; } + + /// Months during the year when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Months during the year when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[] MaintenanceWindowMonth { get => _propertiesBody.MaintenanceWindowMonth?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowMonth = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// Cloud Exadata infrastructure node patching method. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata infrastructure node patching method.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("Rolling", "NonRolling")] + public string MaintenanceWindowPatchingMode { get => _propertiesBody.MaintenanceWindowPatchingMode ?? null; set => _propertiesBody.MaintenanceWindowPatchingMode = value; } + + /// The maintenance window scheduling preference. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance window scheduling preference.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("NoPreference", "CustomPreference")] + public string MaintenanceWindowPreference { get => _propertiesBody.MaintenanceWindowPreference ?? null; set => _propertiesBody.MaintenanceWindowPreference = value; } + + /// + /// Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, + /// and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow + /// maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance + /// cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction + /// with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance + /// will be performed. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowWeeksOfMonth { get => _propertiesBody.MaintenanceWindowWeeksOfMonth?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MaintenanceWindowWeeksOfMonth = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of storage servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + public int StorageCount { get => _propertiesBody.StorageCount ?? default(int); set => _propertiesBody.StorageCount = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructureUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// CloudExadataInfrastructure zones + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CloudExadataInfrastructure zones")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _propertiesBody.Zone?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.Zone = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudExadataInfrastructuresUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudExadataInfrastructuresUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzOracleCloudExadataInfrastructure_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..d658ddad99fa --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath.cs @@ -0,0 +1,610 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudExadataInfrastructure + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString.cs new file mode 100644 index 000000000000..da04645855b6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudExadataInfrastructure + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudExadataInfrastructure_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString Clone() + { + var clone = new UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleCloudExadataInfrastructure_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateExpanded.cs new file mode 100644 index 000000000000..5957c91e1bf9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateExpanded.cs @@ -0,0 +1,764 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudVMCluster_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + public partial class UpdateAzOracleCloudVMCluster_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the CloudVmCluster. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The list of compute servers to be added to the cloud VM cluster. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of compute servers to be added to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + public string[] ComputeNode { get => _propertiesBody.ComputeNode?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.ComputeNode = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The number of CPU cores enabled on the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores enabled on the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsDiagnosticsEventsEnabled { get => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled = value; } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsHealthMonitoringEnabled { get => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled = value; } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsIncidentLogsEnabled { get => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled = value; } + + /// The data disk group size to be allocated in TBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in TBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + public double DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(double); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The local node storage to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The local node storage to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DbNodeStorageSizeInGb { get => _propertiesBody.DbNodeStorageSizeInGb ?? default(int); set => _propertiesBody.DbNodeStorageSizeInGb = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Display Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Display Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + public string LicenseModel { get => _propertiesBody.LicenseModel ?? null; set => _propertiesBody.LicenseModel = value; } + + /// The memory to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The memory to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int MemorySizeInGb { get => _propertiesBody.MemorySizeInGb ?? default(int); set => _propertiesBody.MemorySizeInGb = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + public float OcpuCount { get => _propertiesBody.OcpuCount ?? default(float); set => _propertiesBody.OcpuCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + public string[] SshPublicKey { get => _propertiesBody.SshPublicKey?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.SshPublicKey = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The data disk group size to be allocated in GBs per VM. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in GBs per VM.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int StorageSizeInGb { get => _propertiesBody.StorageSizeInGb ?? default(int); set => _propertiesBody.StorageSizeInGb = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleCloudVMCluster_UpdateExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudVMCluster_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleCloudVMCluster_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleCloudVMCluster_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..fb2b5ad2549a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded.cs @@ -0,0 +1,741 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudVMCluster_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + public partial class UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// The type used for update operations of the CloudVmCluster. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CloudVMClusterUpdate(); + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// The list of compute servers to be added to the cloud VM cluster. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of compute servers to be added to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + public string[] ComputeNode { get => _propertiesBody.ComputeNode?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.ComputeNode = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The number of CPU cores enabled on the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores enabled on the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsDiagnosticsEventsEnabled { get => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled = value; } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsHealthMonitoringEnabled { get => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled = value; } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsIncidentLogsEnabled { get => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled = value; } + + /// The data disk group size to be allocated in TBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in TBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + public double DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(double); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The local node storage to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The local node storage to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DbNodeStorageSizeInGb { get => _propertiesBody.DbNodeStorageSizeInGb ?? default(int); set => _propertiesBody.DbNodeStorageSizeInGb = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Display Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Display Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.PSArgumentCompleterAttribute("LicenseIncluded", "BringYourOwnLicense")] + public string LicenseModel { get => _propertiesBody.LicenseModel ?? null; set => _propertiesBody.LicenseModel = value; } + + /// The memory to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The memory to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int MemorySizeInGb { get => _propertiesBody.MemorySizeInGb ?? default(int); set => _propertiesBody.MemorySizeInGb = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + public float OcpuCount { get => _propertiesBody.OcpuCount ?? default(float); set => _propertiesBody.OcpuCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + public string[] SshPublicKey { get => _propertiesBody.SshPublicKey?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.SshPublicKey = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The data disk group size to be allocated in GBs per VM. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in GBs per VM.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int StorageSizeInGb { get => _propertiesBody.StorageSizeInGb ?? default(int); set => _propertiesBody.StorageSizeInGb = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMClusterUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SerializationMode.IncludeUpdate); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleCloudVMCluster_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..d3e4bc2fe6e0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath.cs @@ -0,0 +1,607 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudVMCluster_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleCloudVMCluster_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonString.cs b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonString.cs new file mode 100644 index 000000000000..9962cb07ee99 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/cmdlets/UpdateAzOracleCloudVMCluster_UpdateViaJsonString.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets; + using System; + + /// Update a CloudVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleCloudVMCluster_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Description(@"Update a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2023-09-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.NotSuggestDefaultParameterSet] + public partial class UpdateAzOracleCloudVMCluster_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener, + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Oracle.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzOracleCloudVMCluster_UpdateViaJsonString + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Cmdlets.UpdateAzOracleCloudVMCluster_UpdateViaJsonString Clone() + { + var clone = new UpdateAzOracleCloudVMCluster_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzOracleCloudVMCluster_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/AsyncCommandRuntime.cs b/src/Oracle/Oracle.Autorest/generated/runtime/AsyncCommandRuntime.cs new file mode 100644 index 000000000000..5d86edfbb396 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/AsyncCommandRuntime.cs @@ -0,0 +1,832 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + using System.Linq; + + internal interface IAsyncCommandRuntimeExtensions + { + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep func); + System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs); + + T ExecuteSync(System.Func step); + } + + public class AsyncCommandRuntime : System.Management.Automation.ICommandRuntime2, IAsyncCommandRuntimeExtensions, System.IDisposable + { + private ICommandRuntime2 originalCommandRuntime; + private System.Threading.Thread originalThread; + public bool AllowInteractive { get; set; } = false; + + public CancellationToken cancellationToken; + SemaphoreSlim semaphore = new SemaphoreSlim(1, 1); + ManualResetEventSlim readyToRun = new ManualResetEventSlim(false); + ManualResetEventSlim completed = new ManualResetEventSlim(false); + + System.Action runOnMainThread; + + private System.Management.Automation.PSCmdlet cmdlet; + + internal AsyncCommandRuntime(System.Management.Automation.PSCmdlet cmdlet, CancellationToken cancellationToken) + { + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + this.cancellationToken = cancellationToken; + this.cmdlet = cmdlet; + if (cmdlet.PagingParameters != null) + { + WriteDebug("Client side pagination is enabled for this cmdlet"); + } + cmdlet.CommandRuntime = this; + } + + public PSHost Host => this.originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => this.originalCommandRuntime.CurrentPSTransaction; + + private void CheckForInteractive() + { + // This is an interactive call -- if we are not on the original thread, this will only work if this was done at ACR creation time; + if (!AllowInteractive) + { + throw new System.Exception("AsyncCommandRuntime is not configured for interactive calls"); + } + } + private void WaitOurTurn() + { + // wait for our turn to play + semaphore?.Wait(cancellationToken); + + // ensure that completed is not set + completed.Reset(); + } + + private void WaitForCompletion() + { + // wait for the result (or cancellation!) + WaitHandle.WaitAny(new[] { cancellationToken.WaitHandle, completed?.WaitHandle }); + + // let go of the semaphore + semaphore?.Release(); + + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target, string action) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target, action); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target, action); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out shouldProcessReason); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + ShouldProcessReason reason = ShouldProcessReason.None; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out reason); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + shouldProcessReason = reason; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.ThrowTerminatingError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.ThrowTerminatingError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool TransactionAvailable() + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.TransactionAvailable(); + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.TransactionAvailable(); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteCommandDetail(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteCommandDetail(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteCommandDetail(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteDebug(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteDebug(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteDebug(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteInformation(informationRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteInformation(informationRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(sourceId, progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(sourceId, progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteVerbose(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteVerbose(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteVerbose(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteWarning(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteWarning(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteWarning(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Wait(System.Threading.Tasks.Task ProcessRecordAsyncTask, System.Threading.CancellationToken cancellationToken) + { + do + { + WaitHandle.WaitAny(new[] { readyToRun.WaitHandle, ((System.IAsyncResult)ProcessRecordAsyncTask).AsyncWaitHandle }); + if (readyToRun.IsSet) + { + // reset the request for the next time + readyToRun.Reset(); + + // run the delegate on this thread + runOnMainThread(); + + // tell the originator everything is complete + completed.Set(); + } + } + while (!ProcessRecordAsyncTask.IsCompleted); + if (ProcessRecordAsyncTask.IsFaulted) + { + // don't unwrap a Aggregate Exception -- we'll lose the stack trace of the actual exception. + // if( ProcessRecordAsyncTask.Exception is System.AggregateException aggregate ) { + // throw aggregate.InnerException; + // } + throw ProcessRecordAsyncTask.Exception; + } + } + public Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep func) => func.Target.GetType().Name != "Closure" ? func : (p1, p2, p3) => ExecuteSync>(() => func(p1, p2, p3)); + public System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs) => funcs?.Select(Wrap); + + public T ExecuteSync(System.Func step) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return step(); + } + + T result = default(T); + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + // set the function to run + runOnMainThread = () => { result = step(); }; + // tell the main thread to go ahead + readyToRun.Set(); + // wait for the result (or cancellation!) + WaitForCompletion(); + // return + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Dispose() + { + if (cmdlet != null) + { + cmdlet.CommandRuntime = this.originalCommandRuntime; + cmdlet = null; + } + + semaphore?.Dispose(); + semaphore = null; + readyToRun?.Dispose(); + readyToRun = null; + completed?.Dispose(); + completed = null; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/AsyncJob.cs b/src/Oracle/Oracle.Autorest/generated/runtime/AsyncJob.cs new file mode 100644 index 000000000000..187b09a3b529 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/AsyncJob.cs @@ -0,0 +1,270 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + + using System.Threading.Tasks; + + public class LongRunningJobCancelledException : System.Exception + { + public LongRunningJobCancelledException(string message) : base(message) + { + + } + } + + public class AsyncJob : Job, System.Management.Automation.ICommandRuntime2 + { + const int MaxRecords = 1000; + + private string _statusMessage = string.Empty; + + public override string StatusMessage => _statusMessage; + + public override bool HasMoreData => Output.Count > 0 || Progress.Count > 0 || Error.Count > 0 || Warning.Count > 0 || Verbose.Count > 0 || Debug.Count > 0; + + public override string Location => "localhost"; + + public PSHost Host => originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => originalCommandRuntime.CurrentPSTransaction; + + public override void StopJob() + { + Cancel(); + } + + private readonly PSCmdlet cmdlet; + private readonly ICommandRuntime2 originalCommandRuntime; + private readonly System.Threading.Thread originalThread; + + private void CheckForInteractive() + { + // This is an interactive call -- We should never allow interactivity in AsnycJob cmdlets. + throw new System.Exception("Cmdlets in AsyncJob; interactive calls are not permitted."); + } + private bool IsJobDone => CancellationToken.IsCancellationRequested || this.JobStateInfo.State == JobState.Failed || this.JobStateInfo.State == JobState.Stopped || this.JobStateInfo.State == JobState.Stopping || this.JobStateInfo.State == JobState.Completed; + + private readonly System.Action Cancel; + private readonly CancellationToken CancellationToken; + + internal AsyncJob(PSCmdlet cmdlet, string line, string name, CancellationToken cancellationToken, System.Action cancelMethod) : base(line, name) + { + SetJobState(JobState.NotStarted); + // know how to cancel/check for cancelation + this.CancellationToken = cancellationToken; + this.Cancel = cancelMethod; + + // we might need these. + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + + // the instance of the cmdlet we're going to run + this.cmdlet = cmdlet; + + // set the command runtime to the AsyncJob + cmdlet.CommandRuntime = this; + } + + /// + /// Monitors the task (which should be ProcessRecordAsync) to control + /// the lifetime of the job itself + /// + /// + public void Monitor(Task task) + { + SetJobState(JobState.Running); + task.ContinueWith(antecedent => + { + if (antecedent.IsCanceled) + { + // if the task was canceled, we're just going to call it completed. + SetJobState(JobState.Completed); + } + else if (antecedent.IsFaulted) + { + foreach (var innerException in antecedent.Exception.Flatten().InnerExceptions) + { + WriteError(new System.Management.Automation.ErrorRecord(innerException, string.Empty, System.Management.Automation.ErrorCategory.NotSpecified, null)); + } + + // a fault indicates an actual failure + SetJobState(JobState.Failed); + } + else + { + // otherwiser it's a completed state. + SetJobState(JobState.Completed); + } + }, CancellationToken); + } + + private void CheckForCancellation() + { + if (IsJobDone) + { + throw new LongRunningJobCancelledException("Long running job is canceled or stopping, continuation of the cmdlet is not permitted."); + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + CheckForCancellation(); + + this.Information.Add(informationRecord); + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public void WriteDebug(string text) + { + _statusMessage = text; + CheckForCancellation(); + + if (Debug.IsOpen && Debug.Count < MaxRecords) + { + Debug.Add(new DebugRecord(text)); + } + } + + public void WriteError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + + public void WriteObject(object sendToPipeline) + { + CheckForCancellation(); + + if (Output.IsOpen) + { + Output.Add(new PSObject(sendToPipeline)); + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + CheckForCancellation(); + + if (enumerateCollection && sendToPipeline is System.Collections.IEnumerable enumerable) + { + foreach (var item in enumerable) + { + WriteObject(item); + } + } + else + { + WriteObject(sendToPipeline); + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteVerbose(string text) + { + CheckForCancellation(); + + if (Verbose.IsOpen && Verbose.Count < MaxRecords) + { + Verbose.Add(new VerboseRecord(text)); + } + } + + public void WriteWarning(string text) + { + CheckForCancellation(); + + if (Warning.IsOpen && Warning.Count < MaxRecords) + { + Warning.Add(new WarningRecord(text)); + } + } + + public void WriteCommandDetail(string text) + { + WriteVerbose(text); + } + + public bool ShouldProcess(string target) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string target, string action) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + CheckForInteractive(); + shouldProcessReason = ShouldProcessReason.None; + return false; + } + + public bool ShouldContinue(string query, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public bool TransactionAvailable() + { + // interactivity required? + return false; + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/AsyncOperationResponse.cs b/src/Oracle/Oracle.Autorest/generated/runtime/AsyncOperationResponse.cs new file mode 100644 index 000000000000..08f7b65d3e69 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/AsyncOperationResponse.cs @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + [System.ComponentModel.TypeConverter(typeof(AsyncOperationResponseTypeConverter))] + public class AsyncOperationResponse + { + private string _target; + public string Target { get => _target; set => _target = value; } + public AsyncOperationResponse() + { + } + internal AsyncOperationResponse(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json) + { + // pull target + { Target = If(json?.PropertyT("target"), out var _v) ? (string)_v : (string)Target; } + } + public string ToJsonString() + { + return $"{{ \"target\" : \"{this.Target}\" }}"; + } + + public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject json ? new AsyncOperationResponse(json) : null; + } + + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(jsonText)); + + } + + public partial class AsyncOperationResponseTypeConverter : System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to a type + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static object ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(AsyncOperationResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AsyncOperationResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString()); ; + } + catch + { + // Unable to use JSON pattern + } + + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as System.Management.Automation.PSObject).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as global::System.Collections.IDictionary).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs new file mode 100644 index 000000000000..b53005ffca22 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Attributes/ExternalDocsAttribute.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle +{ + using System; + using System.Collections.Generic; + using System.Text; + + [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)] + public class ExternalDocsAttribute : Attribute + { + + public string Description { get; } + + public string Url { get; } + + public ExternalDocsAttribute(string url) + { + Url = url; + } + + public ExternalDocsAttribute(string url, string description) + { + Url = url; + Description = description; + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs new file mode 100644 index 000000000000..cfb4ef3e5bd3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Attributes/PSArgumentCompleterAttribute.cs @@ -0,0 +1,52 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle +{ + public class PSArgumentCompleterAttribute : ArgumentCompleterAttribute + { + internal string[] ResourceTypes; + + public PSArgumentCompleterAttribute(params string[] argumentList) : base(CreateScriptBlock(argumentList)) + { + ResourceTypes = argumentList; + } + + public static ScriptBlock CreateScriptBlock(string[] resourceTypes) + { + List outputResourceTypes = new List(); + foreach (string resourceType in resourceTypes) + { + if (resourceType.Contains(" ")) + { + outputResourceTypes.Add("\'\'" + resourceType + "\'\'"); + } + else + { + outputResourceTypes.Add(resourceType); + } + } + string scriptResourceTypeList = "'" + String.Join("' , '", outputResourceTypes) + "'"; + string script = "param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)\n" + + String.Format("$values = {0}\n", scriptResourceTypeList) + + "$values | Where-Object { $_ -Like \"$wordToComplete*\" -or $_ -Like \"'$wordToComplete*\" } | Sort-Object | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }"; + ScriptBlock scriptBlock = ScriptBlock.Create(script); + return scriptBlock; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs new file mode 100644 index 000000000000..a4b088cdc576 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs @@ -0,0 +1,113 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "CmdletSurface")] + [DoNotExport] + public class ExportCmdletSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CmdletFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool IncludeGeneralParameters { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetScriptCmdlets(this, CmdletFolder) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + foreach (var profileGroup in profileGroups) + { + var variantGroups = profileGroup.Variants + .GroupBy(v => new { v.CmdletName }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), String.Empty, profileGroup.ProfileName)); + var sb = UseExpandedFormat ? ExpandedFormat(variantGroups) : CondensedFormat(variantGroups); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, $"CmdletSurface-{profileGroup.ProfileName}.md"), sb.ToString()); + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private StringBuilder ExpandedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + foreach (var variantGroup in variantGroups.OrderBy(vg => vg.CmdletName)) + { + sb.Append($"### {variantGroup.CmdletName}{Environment.NewLine}"); + var parameterGroups = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private StringBuilder CondensedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + var condensedGroups = variantGroups + .GroupBy(vg => vg.CmdletNoun) + .Select(vgg => ( + CmdletNoun: vgg.Key, + CmdletVerbs: vgg.Select(vg => vg.CmdletVerb).OrderBy(cv => cv).ToArray(), + ParameterGroups: vgg.SelectMany(vg => vg.ParameterGroups).DistinctBy(p => p.ParameterName).ToArray(), + OutputTypes: vgg.SelectMany(vg => vg.OutputTypes).Select(ot => ot.Type).DistinctBy(t => t.Name).Select(t => t.ToSyntaxTypeName()).ToArray())) + .OrderBy(vg => vg.CmdletNoun); + foreach (var condensedGroup in condensedGroups) + { + sb.Append($"### {condensedGroup.CmdletNoun} [{String.Join(", ", condensedGroup.CmdletVerbs)}] `{String.Join(", ", condensedGroup.OutputTypes)}`{Environment.NewLine}"); + var parameterGroups = condensedGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs new file mode 100644 index 000000000000..cfc150ca4987 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ExampleStub")] + [DoNotExport] + public class ExportExampleStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + + var exampleText = String.Join(String.Empty, DefaultExampleHelpInfos.Select(ehi => ehi.ToHelpExampleOutput())); + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var cmdletFilePaths = GetScriptCmdlets(exportDirectory).Select(fi => Path.Combine(outputFolder, $"{fi.Name}.md")).ToArray(); + var currentExamplesFilePaths = Directory.GetFiles(outputFolder).ToArray(); + // Remove examples of non-existing cmdlets + var removedCmdletFilePaths = currentExamplesFilePaths.Except(cmdletFilePaths); + foreach (var removedCmdletFilePath in removedCmdletFilePaths) + { + File.Delete(removedCmdletFilePath); + } + + // Only create example stubs if they don't exist + foreach (var cmdletFilePath in cmdletFilePaths.Except(currentExamplesFilePaths)) + { + File.WriteAllText(cmdletFilePath, exampleText); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs new file mode 100644 index 000000000000..7dc656ab99ed --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -0,0 +1,103 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "FormatPs1xml")] + [DoNotExport] + public class ExportFormatPs1xml : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string FilePath { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; + private const string PropertiesExcludedForTableview = @"Id,Type"; + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + private static string SelectedBySuffix = @"#Multiple"; + + protected override void ProcessRecord() + { + try + { + var viewModels = GetFilteredViewParameters().Select(CreateViewModel).ToList(); + var ps1xml = new Configuration + { + ViewDefinitions = new ViewDefinitions + { + Views = viewModels + } + }; + File.WriteAllText(FilePath, ps1xml.ToXmlString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static IEnumerable GetFilteredViewParameters() + { + //https://stackoverflow.com/a/79738/294804 + //https://stackoverflow.com/a/949285/294804 + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass + && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace)) + && !t.GetCustomAttributes().Any()); + return types.Select(t => new ViewParameters(t, t.GetProperties() + .Select(p => new PropertyFormat(p)) + .Where(pf => !pf.Property.GetCustomAttributes().Any() + && (!PropertiesExcludedForTableview.Split(',').Contains(pf.Property.Name)) + && (pf.FormatTable != null || (pf.Origin != PropertyOrigin.Inlined && pf.Property.PropertyType.IsPsSimple()))) + .OrderByDescending(pf => pf.Index.HasValue) + .ThenBy(pf => pf.Index) + .ThenByDescending(pf => pf.Origin.HasValue) + .ThenBy(pf => pf.Origin))).Where(vp => vp.Properties.Any()); + } + + private static View CreateViewModel(ViewParameters viewParameters) + { + var entries = viewParameters.Properties.Select(pf => + (TableColumnHeader: new TableColumnHeader { Label = pf.Label, Width = pf.Width }, + TableColumnItem: new TableColumnItem { PropertyName = pf.Property.Name })).ToArray(); + + return new View + { + Name = viewParameters.Type.FullName, + ViewSelectedBy = new ViewSelectedBy + { + TypeName = string.Concat(viewParameters.Type.FullName, SelectedBySuffix) + }, + TableControl = new TableControl + { + TableHeaders = new TableHeaders + { + TableColumnHeaders = entries.Select(e => e.TableColumnHeader).ToList() + }, + TableRowEntries = new TableRowEntries + { + TableRowEntry = new TableRowEntry + { + TableColumnItems = new TableColumnItems + { + TableItems = entries.Select(e => e.TableColumnItem).ToList() + } + } + } + } + }; + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs new file mode 100644 index 000000000000..b104e4a5c1d9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.MarkdownRenderer; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "HelpMarkdown")] + [DoNotExport] + public class ExportHelpMarkdown : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSModuleInfo ModuleInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] FunctionInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] HelpInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var helpInfos = HelpInfo.Select(hi => hi.ToPsHelpInfo()); + var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() + .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) + .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs new file mode 100644 index 000000000000..9aa0f5a5fbe5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ModelSurface")] + [DoNotExport] + public class ExportModelSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models"; + private const string SupportNamespace = @"${$project.supportNamespace.fullName}"; + + protected override void ProcessRecord() + { + try + { + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace))); + var typeInfos = types.Select(t => new ModelTypeInfo + { + Type = t, + TypeName = t.Name, + Properties = t.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(p => !p.GetIndexParameters().Any()).OrderBy(p => p.Name).ToArray(), + NamespaceGroup = t.Namespace.Split('.').LastOrDefault().EmptyIfNull() + }).Where(mti => mti.Properties.Any()); + var sb = UseExpandedFormat ? ExpandedFormat(typeInfos) : CondensedFormat(typeInfos); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, "ModelSurface.md"), sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static StringBuilder ExpandedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + foreach (var typeInfo in typeInfos.OrderBy(mti => mti.TypeName).ThenBy(mti => mti.NamespaceGroup)) + { + sb.Append($"### {typeInfo.TypeName} [{typeInfo.NamespaceGroup}]{Environment.NewLine}"); + foreach (var property in typeInfo.Properties) + { + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private static StringBuilder CondensedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + var typeGroups = typeInfos + .GroupBy(mti => mti.TypeName) + .Select(tig => ( + Types: tig.Select(mti => mti.Type).ToArray(), + TypeName: tig.Key, + Properties: tig.SelectMany(mti => mti.Properties).DistinctBy(p => p.Name).OrderBy(p => p.Name).ToArray(), + NamespaceGroups: tig.Select(mti => mti.NamespaceGroup).OrderBy(ng => ng).ToArray() + )) + .OrderBy(tg => tg.TypeName); + foreach (var typeGroup in typeGroups) + { + var aType = typeGroup.Types.Select(GetAssociativeType).FirstOrDefault(t => t != null); + var aText = aType != null ? $@" \<{aType.ToSyntaxTypeName()}\>" : String.Empty; + sb.Append($"### {typeGroup.TypeName}{aText} [{String.Join(", ", typeGroup.NamespaceGroups)}]{Environment.NewLine}"); + foreach (var property in typeGroup.Properties) + { + var propertyAType = GetAssociativeType(property.PropertyType); + var propertyAText = propertyAType != null ? $" <{propertyAType.ToSyntaxTypeName()}>" : String.Empty; + var enumNames = GetEnumFieldNames(property.PropertyType.Unwrap()); + var enumNamesText = enumNames.Any() ? $" **{{{String.Join(", ", enumNames)}}}**" : String.Empty; + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}{propertyAText}`{enumNamesText}{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + //https://stackoverflow.com/a/4963190/294804 + private static Type GetAssociativeType(Type type) => + type.GetInterfaces().FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>))?.GetGenericArguments().First(); + + private static string[] GetEnumFieldNames(Type type) => + type.IsValueType && !type.IsPrimitive && type != typeof(decimal) && type != typeof(DateTime) + ? type.GetFields(BindingFlags.Public | BindingFlags.Static).Where(f => f.FieldType == type).Select(p => p.Name).ToArray() + : new string[] { }; + + private class ModelTypeInfo + { + public Type Type { get; set; } + public string TypeName { get; set; } + public PropertyInfo[] Properties { get; set; } + public string NamespaceGroup { get; set; } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs new file mode 100644 index 000000000000..357fc5cb3479 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpers; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.MarkdownRenderer; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsProxyTypeExtensions; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ProxyCmdlet", DefaultParameterSetName = "Docs")] + [DoNotExport] + public class ExportProxyCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string[] ModulePath { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string InternalFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [AllowEmptyString] + public string ModuleDescription { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + public Guid ModuleGuid { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] + public SwitchParameter ExcludeDocs { get; set; } + + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetModuleCmdletsAndHelpInfo(this, ModulePath).SelectMany(ci => ci.ToVariants()).Where(v => !v.IsDoNotExport).ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + var variantGroups = profileGroups.SelectMany(pg => pg.Variants + .GroupBy(v => new { v.CmdletName, v.IsInternal }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + .ToArray(); + var license = new StringBuilder(); + license.Append(@" +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the ""License""); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an ""AS IS"" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +"); + HashSet LicenseSet = new HashSet(); + foreach (var variantGroup in variantGroups) + { + var parameterGroups = variantGroup.ParameterGroups.ToList(); + var isValidProfile = !String.IsNullOrEmpty(variantGroup.ProfileName) && variantGroup.ProfileName != NoProfiles; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, variantGroup.ProfileName) : ExamplesFolder; + var markdownInfo = new MarkdownHelpInfo(variantGroup, examplesFolder); + List examples = new List(); + foreach (var it in markdownInfo.Examples) + { + examples.Add(it); + } + variantGroup.HelpInfo.Examples = examples.ToArray(); + var sb = new StringBuilder(); + sb.Append($"{Environment.NewLine}"); + sb.Append(variantGroup.ToHelpCommentOutput()); + sb.Append($"function {variantGroup.CmdletName} {{{Environment.NewLine}"); + sb.Append(variantGroup.Aliases.ToAliasOutput()); + sb.Append(variantGroup.OutputTypes.ToOutputTypeOutput()); + sb.Append(variantGroup.ToCmdletBindingOutput()); + sb.Append(variantGroup.ProfileName.ToProfileOutput()); + + sb.Append("param("); + sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + + foreach (var parameterGroup in parameterGroups) + { + var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; + parameters = parameters.Where(p => !p.IsHidden()); + if (!parameters.Any()) + { + continue; + } + foreach (var parameter in parameters) + { + sb.Append(parameter.ToParameterOutput(variantGroup.HasMultipleVariants, parameterGroup.HasAllVariants)); + } + sb.Append(parameterGroup.Aliases.ToAliasOutput(true)); + sb.Append(parameterGroup.HasValidateNotNull.ToValidateNotNullOutput()); + sb.Append(parameterGroup.HasAllowEmptyArray.ToAllowEmptyArray()); + sb.Append(parameterGroup.CompleterInfo.ToArgumentCompleterOutput()); + sb.Append(parameterGroup.OrderCategory.ToParameterCategoryOutput()); + sb.Append(parameterGroup.InfoAttribute.ToInfoOutput(parameterGroup.ParameterType)); + sb.Append(parameterGroup.ToDefaultInfoOutput()); + sb.Append(parameterGroup.ParameterType.ToParameterTypeOutput()); + sb.Append(parameterGroup.Description.ToParameterDescriptionOutput()); + sb.Append(parameterGroup.ParameterName.ToParameterNameOutput(parameterGroups.IndexOf(parameterGroup) == parameterGroups.Count - 1)); + } + sb.Append($"){Environment.NewLine}{Environment.NewLine}"); + + sb.Append(variantGroup.ToBeginOutput()); + sb.Append(variantGroup.ToProcessOutput()); + sb.Append(variantGroup.ToEndOutput()); + + sb.Append($"}}{Environment.NewLine}"); + + Directory.CreateDirectory(variantGroup.OutputFolder); + File.WriteAllText(variantGroup.FilePath, license.ToString()); + File.AppendAllText(variantGroup.FilePath, sb.ToString()); + if (!LicenseSet.Contains(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"))) + { + // only add license in the header + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), license.ToString()); + LicenseSet.Add(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1")); + } + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), sb.ToString()); + } + + if (!ExcludeDocs) + { + var moduleInfo = new PsModuleHelpInfo(ModuleName, ModuleGuid, ModuleDescription); + foreach (var variantGroupsByProfile in variantGroups.GroupBy(vg => vg.ProfileName)) + { + var profileName = variantGroupsByProfile.Key; + var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; + var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs new file mode 100644 index 000000000000..a147eedbf5a7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -0,0 +1,193 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "Psd1")] + [DoNotExport] + public class ExportPsd1 : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CustomFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + [Parameter(Mandatory = true)] + public Guid ModuleGuid { get; set; } + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private const string CustomFolderRelative = "./custom"; + private const string Indent = Psd1Indent; + private const string Undefined = "undefined"; + private bool IsUndefined(string value) => string.Equals(Undefined, value, StringComparison.OrdinalIgnoreCase); + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + if (!Directory.Exists(CustomFolder)) + { + throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); + } + + string version = Convert.ToString(@"0.1.0"); + // Validate the module version should be semantic version + // Following regex is official from https://semver.org/ + Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); + if (rx.Matches(version).Count != 1) + { + throw new ArgumentException("Module-version is not a valid Semantic Version"); + } + + string previewVersion = null; + if (version.Contains('-')) + { + string[] versions = version.Split("-".ToCharArray(), 2); + version = versions[0]; + previewVersion = versions[1]; + } + + var sb = new StringBuilder(); + sb.AppendLine("@{"); + sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); + sb.AppendLine($@"{Indent}RootModule = '{"./Az.Oracle.psm1"}'"); + sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); + sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); + sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); + sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: Oracle cmdlets"}'"); + sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); + sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); + + // RequiredModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredModules = @({"undefined"})"); + } + + // RequiredAssemblies + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredAssemblies = @({"undefined"})"); + } + else + { + sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.Oracle.private.dll"}'"); + } + + // NestedModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}NestedModules = @({"undefined"})"); + } + + // FormatsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FormatsToProcess = @({"undefined"})"); + } + else + { + var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) + .Where(f => f.EndsWith(".format.ps1xml")) + .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); + var formatList = customFormatPs1xmlFiles.Prepend("./Az.Oracle.format.ps1xml").ToPsList(); + sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); + } + + // TypesToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}TypesToProcess = @({"undefined"})"); + } + + // ScriptsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}ScriptsToProcess = @({"undefined"})"); + } + + var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); + // FunctionsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FunctionsToExport = @({"undefined"})"); + } + else + { + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().ToPsList(); + sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); + } + + // AliasesToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}AliasesToExport = @({"undefined"})"); + } + else + { + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().ToPsList(); + if (!String.IsNullOrEmpty(aliasesList)) { + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } + } + + // CmdletsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}CmdletsToExport = @({"undefined"})"); + } + + sb.AppendLine($@"{Indent}PrivateData = @{{"); + sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); + + if (previewVersion != null) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'"); + } + sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule Oracle".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); + var profilesList = ""; + if (IsAzure && !String.IsNullOrEmpty(profilesList)) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + } + + sb.AppendLine($@"{Indent}{Indent}}}"); + sb.AppendLine($@"{Indent}}}"); + sb.AppendLine(@"}"); + + File.WriteAllText(Psd1Path, sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs new file mode 100644 index 000000000000..e59700512237 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -0,0 +1,197 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + /*var loadEnvFile = Path.Combine(OutputFolder, "loadEnv.ps1"); + if (!File.Exists(loadEnvFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@" +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json +}"); + File.WriteAllText(loadEnvFile, sc.ToString()); + }*/ + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} +"); + File.WriteAllText(utilFile, sc.ToString()); + } + + + + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath)" + ); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} +"); + + + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); + + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs new file mode 100644 index 000000000000..73d46d5857e0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "CommonParameter")] + [OutputType(typeof(Dictionary))] + [DoNotExport] + public class GetCommonParameter : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSCmdlet PSCmdlet { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public Dictionary PSBoundParameter { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = PSCmdlet.MyInvocation.MyCommand.ToVariants(); + var commonParameterNames = variants.ToParameterGroups() + .Where(pg => pg.OrderCategory == ParameterCategory.Azure || pg.OrderCategory == ParameterCategory.Runtime) + .Select(pg => pg.ParameterName); + if (variants.Any(v => v.SupportsShouldProcess)) + { + commonParameterNames = commonParameterNames.Append("Confirm").Append("WhatIf"); + } + if (variants.Any(v => v.SupportsPaging)) + { + commonParameterNames = commonParameterNames.Append("First").Append("Skip").Append("IncludeTotalCount"); + } + + var names = commonParameterNames.ToArray(); + var keys = PSBoundParameter.Keys.Where(k => names.Contains(k)); + WriteObject(keys.ToDictionary(key => key, key => PSBoundParameter[key]), true); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs new file mode 100644 index 000000000000..f2704cfdd2a2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ModuleGuid")] + [DoNotExport] + public class GetModuleGuid : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + protected override void ProcessRecord() + { + try + { + WriteObject(ReadGuidFromPsd1(Psd1Path)); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs new file mode 100644 index 000000000000..4f75185098df --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs @@ -0,0 +1,54 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ScriptCmdlet")] + [OutputType(typeof(string[]))] + [DoNotExport] + public class GetScriptCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ScriptFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeDoNotExport { get; set; } + + [Parameter] + public SwitchParameter AsAlias { get; set; } + + [Parameter] + public SwitchParameter AsFunctionInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var functionInfos = GetScriptCmdlets(this, ScriptFolder) + .Where(fi => IncludeDoNotExport || !fi.ScriptBlock.Attributes.OfType().Any()) + .ToArray(); + if (AsFunctionInfo) + { + WriteObject(functionInfos, true); + return; + } + var aliases = functionInfos.SelectMany(i => i.ScriptBlock.Attributes).ToAliasNames(); + var names = functionInfos.Select(fi => fi.Name).Distinct(); + var output = (AsAlias ? aliases : names).DefaultIfEmpty("''").ToArray(); + WriteObject(output, true); + } + catch (System.Exception ee) + { + System.Console.Error.WriteLine($"{ee.GetType().Name}: {ee.Message}"); + System.Console.Error.WriteLine(ee.StackTrace); + throw ee; + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs new file mode 100644 index 000000000000..21dc9f198abc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/CollectionExtensions.cs @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal static class CollectionExtensions + { + public static T[] NullIfEmpty(this T[] collection) => (collection?.Any() ?? false) ? collection : null; + public static IEnumerable EmptyIfNull(this IEnumerable collection) => collection ?? Enumerable.Empty(); + + // https://stackoverflow.com/a/4158364/294804 + public static IEnumerable DistinctBy(this IEnumerable collection, Func selector) => + collection.GroupBy(selector).Select(group => group.First()); + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs new file mode 100644 index 000000000000..c07001486761 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -0,0 +1,122 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsProxyOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal static class MarkdownRenderer + { + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) + { + Directory.CreateDirectory(docsFolder); + var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); + + foreach (var markdownInfo in markdownInfos) + { + var sb = new StringBuilder(); + sb.Append(markdownInfo.ToHelpMetadataOutput()); + sb.Append($"# {markdownInfo.CmdletName}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"## SYNOPSIS{Environment.NewLine}{markdownInfo.Synopsis.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## SYNTAX{Environment.NewLine}{Environment.NewLine}"); + var hasMultipleParameterSets = markdownInfo.SyntaxInfos.Length > 1; + foreach (var syntaxInfo in markdownInfo.SyntaxInfos) + { + sb.Append(syntaxInfo.ToHelpSyntaxOutput(hasMultipleParameterSets)); + } + + sb.Append($"## DESCRIPTION{Environment.NewLine}{markdownInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## EXAMPLES{Environment.NewLine}{Environment.NewLine}"); + foreach (var exampleInfo in markdownInfo.Examples) + { + sb.Append(exampleInfo.ToHelpExampleOutput()); + } + + sb.Append($"## PARAMETERS{Environment.NewLine}{Environment.NewLine}"); + foreach (var parameter in markdownInfo.Parameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + if (markdownInfo.SupportsShouldProcess) + { + foreach (var parameter in SupportsShouldProcessParameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + } + + sb.Append($"### CommonParameters{Environment.NewLine}This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## INPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var input in markdownInfo.Inputs) + { + sb.Append($"### {input}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## OUTPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var output in markdownInfo.Outputs) + { + sb.Append($"### {output}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.Aliases.Any()) + { + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); + } + foreach (var alias in markdownInfo.Aliases) + { + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + } + + if (AddComplexInterfaceInfo) + { + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + + } + + sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); + foreach (var relatedLink in markdownInfo.RelatedLinks) + { + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); + } + + WriteModulePage(moduleHelpInfo, markdownInfos, docsFolder); + } + + private static void WriteModulePage(PsModuleHelpInfo moduleInfo, MarkdownHelpInfo[] markdownInfos, string docsFolder) + { + var sb = new StringBuilder(); + sb.Append(moduleInfo.ToModulePageMetadataOutput()); + sb.Append($"# {moduleInfo.Name} Module{Environment.NewLine}"); + sb.Append($"## Description{Environment.NewLine}{moduleInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## {moduleInfo.Name} Cmdlets{Environment.NewLine}"); + foreach (var markdownInfo in markdownInfos) + { + sb.Append(markdownInfo.ToModulePageCmdletOutput()); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{moduleInfo.Name}.md"), sb.ToString()); + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs new file mode 100644 index 000000000000..4d88cbf52267 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsFormatTypes.cs @@ -0,0 +1,138 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal class ViewParameters + { + public Type Type { get; } + public IEnumerable Properties { get; } + + public ViewParameters(Type type, IEnumerable properties) + { + Type = type; + Properties = properties; + } + } + + internal class PropertyFormat + { + public PropertyInfo Property { get; } + public FormatTableAttribute FormatTable { get; } + + public int? Index { get; } + public string Label { get; } + public int? Width { get; } + public PropertyOrigin? Origin { get; } + + public PropertyFormat(PropertyInfo propertyInfo) + { + Property = propertyInfo; + FormatTable = Property.GetCustomAttributes().FirstOrDefault(); + var origin = Property.GetCustomAttributes().FirstOrDefault(); + + Index = FormatTable?.HasIndex ?? false ? (int?)FormatTable.Index : null; + Label = FormatTable?.Label ?? propertyInfo.Name; + Width = FormatTable?.HasWidth ?? false ? (int?)FormatTable.Width : null; + // If we have an index, we don't want to use Origin. + Origin = FormatTable?.HasIndex ?? false ? null : origin?.Origin; + } + } + + [Serializable] + [XmlRoot(nameof(Configuration))] + public class Configuration + { + [XmlElement("ViewDefinitions")] + public ViewDefinitions ViewDefinitions { get; set; } + } + + [Serializable] + public class ViewDefinitions + { + //https://stackoverflow.com/a/10518657/294804 + [XmlElement("View")] + public List Views { get; set; } + } + + [Serializable] + public class View + { + [XmlElement(nameof(Name))] + public string Name { get; set; } + [XmlElement(nameof(ViewSelectedBy))] + public ViewSelectedBy ViewSelectedBy { get; set; } + [XmlElement(nameof(TableControl))] + public TableControl TableControl { get; set; } + } + + [Serializable] + public class ViewSelectedBy + { + [XmlElement(nameof(TypeName))] + public string TypeName { get; set; } + } + + [Serializable] + public class TableControl + { + [XmlElement(nameof(TableHeaders))] + public TableHeaders TableHeaders { get; set; } + [XmlElement(nameof(TableRowEntries))] + public TableRowEntries TableRowEntries { get; set; } + } + + [Serializable] + public class TableHeaders + { + [XmlElement("TableColumnHeader")] + public List TableColumnHeaders { get; set; } + } + + [Serializable] + public class TableColumnHeader + { + [XmlElement(nameof(Label))] + public string Label { get; set; } + [XmlElement(nameof(Width))] + public int? Width { get; set; } + + //https://stackoverflow.com/a/4095225/294804 + public bool ShouldSerializeWidth() => Width.HasValue; + } + + [Serializable] + public class TableRowEntries + { + [XmlElement(nameof(TableRowEntry))] + public TableRowEntry TableRowEntry { get; set; } + } + + [Serializable] + public class TableRowEntry + { + [XmlElement(nameof(TableColumnItems))] + public TableColumnItems TableColumnItems { get; set; } + } + + [Serializable] + public class TableColumnItems + { + [XmlElement("TableColumnItem")] + public List TableItems { get; set; } + } + + [Serializable] + public class TableColumnItem + { + [XmlElement(nameof(PropertyName))] + public string PropertyName { get; set; } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs new file mode 100644 index 000000000000..8fad82d52d56 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -0,0 +1,199 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal class HelpMetadataOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public HelpMetadataOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"--- +external help file:{(!String.IsNullOrEmpty(HelpInfo.ExternalHelpFilename) ? $" {HelpInfo.ExternalHelpFilename}" : String.Empty)} +Module Name: {HelpInfo.ModuleName} +online version: {HelpInfo.OnlineVersion} +schema: {HelpInfo.Schema.ToString(3)} +--- + +"; + } + + internal class HelpSyntaxOutput + { + public MarkdownSyntaxHelpInfo SyntaxInfo { get; } + public bool HasMultipleParameterSets { get; } + + public HelpSyntaxOutput(MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) + { + SyntaxInfo = syntaxInfo; + HasMultipleParameterSets = hasMultipleParameterSets; + } + + public override string ToString() + { + var psnText = HasMultipleParameterSets ? $"### {SyntaxInfo.ParameterSetName}{(SyntaxInfo.IsDefault ? " (Default)" : String.Empty)}{Environment.NewLine}" : String.Empty; + return $@"{psnText}``` +{SyntaxInfo.SyntaxText} +``` + +"; + } + } + + internal class HelpExampleOutput + { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + + public MarkdownExampleHelpInfo ExampleInfo { get; } + + public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) + { + ExampleInfo = exampleInfo; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } + } + + internal class HelpParameterOutput + { + public MarkdownParameterHelpInfo ParameterInfo { get; } + + public HelpParameterOutput(MarkdownParameterHelpInfo parameterInfo) + { + ParameterInfo = parameterInfo; + } + + public override string ToString() + { + var pipelineInputTypes = new[] + { + ParameterInfo.AcceptsPipelineByValue ? "ByValue" : String.Empty, + ParameterInfo.AcceptsPipelineByPropertyName ? "ByPropertyName" : String.Empty + }.JoinIgnoreEmpty(", "); + var pipelineInput = ParameterInfo.AcceptsPipelineByValue || ParameterInfo.AcceptsPipelineByPropertyName + ? $@"{true} ({pipelineInputTypes})" + : false.ToString(); + + return $@"### -{ParameterInfo.Name} +{ParameterInfo.Description.ToDescriptionFormat()} + +```yaml +Type: {ParameterInfo.Type.FullName} +Parameter Sets: {(ParameterInfo.HasAllParameterSets ? "(All)" : ParameterInfo.ParameterSetNames.JoinIgnoreEmpty(", "))} +Aliases:{(ParameterInfo.Aliases.Any() ? $" {ParameterInfo.Aliases.JoinIgnoreEmpty(", ")}" : String.Empty)} + +Required: {ParameterInfo.IsRequired} +Position: {ParameterInfo.Position} +Default value: {ParameterInfo.DefaultValue} +Accept pipeline input: {pipelineInput} +Accept wildcard characters: {ParameterInfo.AcceptsWildcardCharacters} +``` + +"; + } + } + + internal class ModulePageMetadataOutput + { + public PsModuleHelpInfo ModuleInfo { get; } + + private static string HelpLinkPrefix { get; } = @"https://learn.microsoft.com/powershell/module/"; + + public ModulePageMetadataOutput(PsModuleHelpInfo moduleInfo) + { + ModuleInfo = moduleInfo; + } + + public override string ToString() => $@"--- +Module Name: {ModuleInfo.Name} +Module Guid: {ModuleInfo.Guid} +Download Help Link: {HelpLinkPrefix}{ModuleInfo.Name.ToLowerInvariant()} +Help Version: 1.0.0.0 +Locale: en-US +--- + +"; + } + + internal class ModulePageCmdletOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public ModulePageCmdletOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"### [{HelpInfo.CmdletName}]({HelpInfo.CmdletName}.md) +{HelpInfo.Synopsis.ToDescriptionFormat()} + +"; + } + + internal static class PsHelpOutputExtensions + { + public static string EscapeAngleBrackets(this string text) => text?.Replace("<", @"\<").Replace(">", @"\>"); + public static string ReplaceSentenceEndWithNewline(this string text) => text?.Replace(". ", $".{Environment.NewLine}").Replace(". ", $".{Environment.NewLine}"); + public static string ReplaceBrWithNewline(this string text) => text?.Replace("
", $"{Environment.NewLine}"); + public static string ToDescriptionFormat(this string text, bool escapeAngleBrackets = true) + { + var description = text?.ReplaceBrWithNewline(); + description = escapeAngleBrackets ? description?.EscapeAngleBrackets() : description; + return description?.ReplaceSentenceEndWithNewline().Trim(); + } + + public const string ExampleNameHeader = "### "; + public const string ExampleCodeHeader = "```powershell"; + public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; + + public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); + + public static HelpSyntaxOutput ToHelpSyntaxOutput(this MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) => new HelpSyntaxOutput(syntaxInfo, hasMultipleParameterSets); + + public static HelpExampleOutput ToHelpExampleOutput(this MarkdownExampleHelpInfo exampleInfo) => new HelpExampleOutput(exampleInfo); + + public static HelpParameterOutput ToHelpParameterOutput(this MarkdownParameterHelpInfo parameterInfo) => new HelpParameterOutput(parameterInfo); + + public static ModulePageMetadataOutput ToModulePageMetadataOutput(this PsModuleHelpInfo moduleInfo) => new ModulePageMetadataOutput(moduleInfo); + + public static ModulePageCmdletOutput ToModulePageCmdletOutput(this MarkdownHelpInfo helpInfo) => new ModulePageCmdletOutput(helpInfo); + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs new file mode 100644 index 000000000000..cc254831fb28 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -0,0 +1,202 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal class PsHelpInfo + { + public string CmdletName { get; } + public string ModuleName { get; } + public string Synopsis { get; } + public string Description { get; } + public string AlertText { get; } + public string Category { get; } + public PsHelpLinkInfo OnlineVersion { get; } + public PsHelpLinkInfo[] RelatedLinks { get; } + public bool? HasCommonParameters { get; } + public bool? HasWorkflowCommonParameters { get; } + + public PsHelpTypeInfo[] InputTypes { get; } + public PsHelpTypeInfo[] OutputTypes { get; } + public PsHelpExampleInfo[] Examples { get; set; } + public string[] Aliases { get; } + + public PsParameterHelpInfo[] Parameters { get; } + public PsHelpSyntaxInfo[] Syntax { get; } + + public object Component { get; } + public object Functionality { get; } + public object PsSnapIn { get; } + public object Role { get; } + public string NonTerminatingErrors { get; } + + public PsHelpInfo(PSObject helpObject = null) + { + helpObject = helpObject ?? new PSObject(); + CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); + ModuleName = helpObject.GetProperty("ModuleName"); + Synopsis = helpObject.GetProperty("Synopsis"); + Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? + helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); + Category = helpObject.GetProperty("Category"); + HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); + HasWorkflowCommonParameters = helpObject.GetProperty("WorkflowCommonParameters").ToNullableBool(); + + var links = helpObject.GetNestedProperty("relatedLinks", "navigationLink").EmptyIfNull().Select(nl => nl.ToLinkInfo()).ToArray(); + OnlineVersion = links.FirstOrDefault(l => l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length == 1); + RelatedLinks = links.Where(l => !l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length != 1).ToArray(); + + InputTypes = helpObject.GetNestedProperty("inputTypes", "inputType").EmptyIfNull().Select(it => it.ToTypeInfo()).ToArray(); + OutputTypes = helpObject.GetNestedProperty("returnValues", "returnValue").EmptyIfNull().Select(rv => rv.ToTypeInfo()).ToArray(); + Examples = helpObject.GetNestedProperty("examples", "example").EmptyIfNull().Select(e => e.ToExampleInfo()).ToArray(); + Aliases = helpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + + Parameters = helpObject.GetNestedProperty("parameters", "parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + Syntax = helpObject.GetNestedProperty("syntax", "syntaxItem").EmptyIfNull().Select(si => si.ToSyntaxInfo()).ToArray(); + + Component = helpObject.GetProperty("Component"); + Functionality = helpObject.GetProperty("Functionality"); + PsSnapIn = helpObject.GetProperty("PSSnapIn"); + Role = helpObject.GetProperty("Role"); + NonTerminatingErrors = helpObject.GetProperty("nonTerminatingErrors"); + } + } + + internal class PsHelpTypeInfo + { + public string Name { get; } + public string Description { get; } + + public PsHelpTypeInfo(PSObject typeObject) + { + Name = typeObject.GetNestedProperty("type", "name").EmptyIfNull().Trim(); + Description = typeObject.GetProperty("description").EmptyIfNull().ToDescriptionText(); + } + } + + internal class PsHelpLinkInfo + { + public string Uri { get; } + public string Text { get; } + + public PsHelpLinkInfo(PSObject linkObject) + { + Uri = linkObject.GetProperty("uri"); + Text = linkObject.GetProperty("linkText"); + } + } + + internal class PsHelpSyntaxInfo + { + public string CmdletName { get; } + public PsParameterHelpInfo[] Parameters { get; } + + public PsHelpSyntaxInfo(PSObject syntaxObject) + { + CmdletName = syntaxObject.GetProperty("name"); + Parameters = syntaxObject.GetProperty("parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + } + } + + internal class PsHelpExampleInfo + { + public string Title { get; } + public string Code { get; } + public string Output { get; } + public string Remarks { get; } + + public PsHelpExampleInfo(PSObject exampleObject) + { + Title = exampleObject.GetProperty("title"); + Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); + Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); + } + public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) + { + Title = markdownExample.Name; + Code = markdownExample.Code; + Output = markdownExample.Output; + Remarks = markdownExample.Description; + } + + public static implicit operator PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) => new PsHelpExampleInfo(markdownExample); + } + + internal class PsParameterHelpInfo + { + public string DefaultValueAsString { get; } + + public string Name { get; } + public string TypeName { get; } + public string Description { get; } + public string SupportsPipelineInput { get; } + public string PositionText { get; } + public string[] ParameterSetNames { get; } + public string[] Aliases { get; } + + public bool? SupportsGlobbing { get; } + public bool? IsRequired { get; } + public bool? IsVariableLength { get; } + public bool? IsDynamic { get; } + + public PsParameterHelpInfo(PSObject parameterHelpObject = null) + { + parameterHelpObject = parameterHelpObject ?? new PSObject(); + DefaultValueAsString = parameterHelpObject.GetProperty("defaultValue"); + Name = parameterHelpObject.GetProperty("name"); + TypeName = parameterHelpObject.GetProperty("parameterValue").NullIfEmpty() ?? parameterHelpObject.GetNestedProperty("type", "name"); + Description = parameterHelpObject.GetProperty("Description").EmptyIfNull().ToDescriptionText(); + SupportsPipelineInput = parameterHelpObject.GetProperty("pipelineInput"); + PositionText = parameterHelpObject.GetProperty("position"); + ParameterSetNames = parameterHelpObject.GetProperty("parameterSetName").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + Aliases = parameterHelpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + + SupportsGlobbing = parameterHelpObject.GetProperty("globbing").ToNullableBool(); + IsRequired = parameterHelpObject.GetProperty("required").ToNullableBool(); + IsVariableLength = parameterHelpObject.GetProperty("variableLength").ToNullableBool(); + IsDynamic = parameterHelpObject.GetProperty("isDynamic").ToNullableBool(); + } + } + + internal class PsModuleHelpInfo + { + public string Name { get; } + public Guid Guid { get; } + public string Description { get; } + + public PsModuleHelpInfo(PSModuleInfo moduleInfo) + : this(moduleInfo?.Name ?? String.Empty, moduleInfo?.Guid ?? Guid.NewGuid(), moduleInfo?.Description ?? String.Empty) + { + } + + public PsModuleHelpInfo(string name, Guid guid, string description) + { + Name = name; + Guid = guid; + Description = description; + } + } + + internal static class HelpTypesExtensions + { + public static PsHelpInfo ToPsHelpInfo(this PSObject helpObject) => new PsHelpInfo(helpObject); + public static PsParameterHelpInfo ToPsParameterHelpInfo(this PSObject parameterHelpObject) => new PsParameterHelpInfo(parameterHelpObject); + + public static string ToDescriptionText(this IEnumerable descriptionObject) => descriptionObject != null + ? String.Join(Environment.NewLine, descriptionObject.Select(dl => dl.GetProperty("Text").EmptyIfNull())).NullIfWhiteSpace() + : null; + public static PsHelpTypeInfo ToTypeInfo(this PSObject typeObject) => new PsHelpTypeInfo(typeObject); + public static PsHelpExampleInfo ToExampleInfo(this PSObject exampleObject) => new PsHelpExampleInfo(exampleObject); + public static PsHelpLinkInfo ToLinkInfo(this PSObject linkObject) => new PsHelpLinkInfo(linkObject); + public static PsHelpSyntaxInfo ToSyntaxInfo(this PSObject syntaxObject) => new PsHelpSyntaxInfo(syntaxObject); + public static PsModuleHelpInfo ToModuleInfo(this PSModuleInfo moduleInfo) => new PsModuleHelpInfo(moduleInfo); + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs new file mode 100644 index 000000000000..950178110ff0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -0,0 +1,329 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal class MarkdownHelpInfo + { + public string ExternalHelpFilename { get; } + public string ModuleName { get; } + public string OnlineVersion { get; } + public Version Schema { get; } + + public string CmdletName { get; } + public string[] Aliases { get; } + public string Synopsis { get; } + public string Description { get; } + + public MarkdownSyntaxHelpInfo[] SyntaxInfos { get; } + public MarkdownExampleHelpInfo[] Examples { get; } + public MarkdownParameterHelpInfo[] Parameters { get; } + + public string[] Inputs { get; } + public string[] Outputs { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + public MarkdownRelatedLinkInfo[] RelatedLinks { get; } + + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string externalHelpFilename = "") + { + ExternalHelpFilename = externalHelpFilename; + ModuleName = variantGroup.RootModuleName != "" ? variantGroup.RootModuleName : variantGroup.ModuleName; + var helpInfo = variantGroup.HelpInfo; + var commentInfo = variantGroup.CommentInfo; + Schema = Version.Parse("2.0.0"); + + CmdletName = variantGroup.CmdletName; + Aliases = (variantGroup.Aliases.NullIfEmpty() ?? helpInfo.Aliases).Where(a => a != "None").ToArray(); + Synopsis = commentInfo.Synopsis; + Description = commentInfo.Description; + + SyntaxInfos = variantGroup.Variants + .Select(v => new MarkdownSyntaxHelpInfo(v, variantGroup.ParameterGroups, v.VariantName == variantGroup.DefaultParameterSetName)) + .OrderByDescending(v => v.IsDefault).ThenBy(v => v.ParameterSetName).ToArray(); + Examples = GetExamplesFromMarkdown(examplesFolder).NullIfEmpty() + ?? helpInfo.Examples.Select(e => e.ToExampleHelpInfo()).ToArray().NullIfEmpty() + ?? DefaultExampleHelpInfos; + + Parameters = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && !pg.Parameters.All(p => p.IsHidden())) + .Select(pg => new MarkdownParameterHelpInfo( + variantGroup.Variants.SelectMany(v => v.HelpInfo.Parameters).Where(phi => phi.Name == pg.ParameterName).ToArray(), pg)) + .OrderBy(phi => phi.Name).ToArray(); + + Inputs = commentInfo.Inputs; + Outputs = commentInfo.Outputs; + + ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; + OnlineVersion = commentInfo.OnlineVersion; + + var relatedLinkLists = new List(); + relatedLinkLists.AddRange(commentInfo.RelatedLinks?.Select(link => new MarkdownRelatedLinkInfo(link))); + relatedLinkLists.AddRange(variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Distinct()?.Select(link => new MarkdownRelatedLinkInfo(link.Url, link.Description))); + RelatedLinks = relatedLinkLists?.ToArray(); + + SupportsShouldProcess = variantGroup.SupportsShouldProcess; + SupportsPaging = variantGroup.SupportsPaging; + } + + private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) + { + var filePath = Path.Combine(examplesFolder, $"{CmdletName}.md"); + if (!Directory.Exists(examplesFolder) || !File.Exists(filePath)) return null; + + var lines = File.ReadAllLines(filePath); + var nameIndices = lines.Select((l, i) => l.StartsWith(ExampleNameHeader) ? i : -1).Where(i => i != -1).ToArray(); + //https://codereview.stackexchange.com/a/187148/68772 + var indexCountGroups = nameIndices.Skip(1).Append(lines.Length).Zip(nameIndices, (next, current) => (NameIndex: current, LineCount: next - current)); + var exampleGroups = indexCountGroups.Select(icg => lines.Skip(icg.NameIndex).Take(icg.LineCount).ToArray()); + return exampleGroups.Select(eg => + { + var name = eg.First().Replace(ExampleNameHeader, String.Empty); + var codeStartIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var codeEndIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i != codeStartIndex); + var code = codeStartIndex.HasValue && codeEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) + : String.Empty; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; + descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; + var descriptionEndIndex = eg.Length - 1; + descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; + var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); + return new MarkdownExampleHelpInfo(name, code, output, description); + }).ToArray(); + } + } + + internal class MarkdownSyntaxHelpInfo + { + public Variant Variant { get; } + public bool IsDefault { get; } + public string ParameterSetName { get; } + public Parameter[] Parameters { get; } + public string SyntaxText { get; } + + public MarkdownSyntaxHelpInfo(Variant variant, ParameterGroup[] parameterGroups, bool isDefault) + { + Variant = variant; + IsDefault = isDefault; + ParameterSetName = Variant.VariantName; + Parameters = Variant.Parameters + .Where(p => !p.DontShow && !p.IsHidden()).OrderByDescending(p => p.IsMandatory) + //https://stackoverflow.com/a/6461526/294804 + .ThenByDescending(p => p.Position.HasValue).ThenBy(p => p.Position) + // Use the OrderCategory of the parameter group because the final order category is the highest of the group, and not the order category of the individual parameters from the variants. + .ThenBy(p => parameterGroups.First(pg => pg.ParameterName == p.ParameterName).OrderCategory).ThenBy(p => p.ParameterName).ToArray(); + SyntaxText = CreateSyntaxFormat(); + } + + //https://github.com/PowerShell/platyPS/blob/a607a926bfffe1e1a1e53c19e0057eddd0c07611/src/Markdown.MAML/Renderer/Markdownv2Renderer.cs#L29-L32 + private const int SyntaxLineWidth = 110; + private string CreateSyntaxFormat() + { + var parameterStrings = Parameters.Select(p => p.ToPropertySyntaxOutput().ToString()); + if (Variant.SupportsShouldProcess) + { + parameterStrings = parameterStrings.Append(" [-Confirm]").Append(" [-WhatIf]"); + } + parameterStrings = parameterStrings.Append(" []"); + + var lines = new List(20); + return parameterStrings.Aggregate(Variant.CmdletName, (current, ps) => + { + var combined = current + ps; + if (combined.Length <= SyntaxLineWidth) return combined; + + lines.Add(current); + return ps; + }, last => + { + lines.Add(last); + return String.Join(Environment.NewLine, lines); + }); + } + } + + internal class MarkdownExampleHelpInfo + { + public string Name { get; } + public string Code { get; } + public string Output { get; } + public string Description { get; } + + public MarkdownExampleHelpInfo(string name, string code, string output, string description) + { + Name = name; + Code = code; + Output = output; + Description = description; + } + } + + internal class MarkdownParameterHelpInfo + { + public string Name { get; set; } + public string Description { get; set; } + public Type Type { get; set; } + public string Position { get; set; } + public string DefaultValue { get; set; } + + public bool HasAllParameterSets { get; set; } + public string[] ParameterSetNames { get; set; } + public string[] Aliases { get; set; } + + public bool IsRequired { get; set; } + public bool IsDynamic { get; set; } + public bool AcceptsPipelineByValue { get; set; } + public bool AcceptsPipelineByPropertyName { get; set; } + public bool AcceptsWildcardCharacters { get; set; } + + // For use by common parameters that have no backing data in the objects themselves. + public MarkdownParameterHelpInfo() { } + + public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, ParameterGroup parameterGroup) + { + Name = parameterGroup.ParameterName; + Description = parameterGroup.Description.NullIfEmpty() + ?? parameterHelpInfos.Select(phi => phi.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + Type = parameterGroup.ParameterType; + Position = parameterGroup.FirstPosition?.ToString() + ?? parameterHelpInfos.Select(phi => phi.PositionText).FirstOrDefault(d => !String.IsNullOrEmpty(d)).ToUpperFirstCharacter().NullIfEmpty() + ?? "Named"; + // This no longer uses firstHelpInfo.DefaultValueAsString since it seems to be broken. For example, it has a value of 0 for Int32, but no default value was declared. + DefaultValue = parameterGroup.DefaultInfo?.Script ?? "None"; + + HasAllParameterSets = parameterGroup.HasAllVariants; + ParameterSetNames = (parameterGroup.Parameters.Select(p => p.VariantName).ToArray().NullIfEmpty() + ?? parameterHelpInfos.SelectMany(phi => phi.ParameterSetNames).Distinct()) + .OrderBy(psn => psn).ToArray(); + Aliases = parameterGroup.Aliases.NullIfEmpty() ?? parameterHelpInfos.SelectMany(phi => phi.Aliases).ToArray(); + + IsRequired = parameterHelpInfos.Select(phi => phi.IsRequired).FirstOrDefault(r => r == true) ?? parameterGroup.Parameters.Any(p => p.IsMandatory); + IsDynamic = parameterHelpInfos.Select(phi => phi.IsDynamic).FirstOrDefault(d => d == true) ?? false; + AcceptsPipelineByValue = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByValue")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipeline; + AcceptsPipelineByPropertyName = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByPropertyName")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipelineByPropertyName; + AcceptsWildcardCharacters = parameterGroup.SupportsWildcards; + } + } + + internal class MarkdownRelatedLinkInfo + { + public string Url { get; } + public string Description { get; } + + public MarkdownRelatedLinkInfo(string url) + { + Url = url; + } + + public MarkdownRelatedLinkInfo(string url, string description) + { + Url = url; + Description = description; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(Description)) + { + return Url; + } + else + { + return $@"[{Description}]({Url})"; + + } + + } + } + + internal static class MarkdownTypesExtensions + { + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); + + public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = + { + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here (remove the output block if the example doesn't have an output) }}}}", @"{{ Add description here }}"), + }; + + public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = + { + new MarkdownParameterHelpInfo + { + Name = "Confirm", + Description ="Prompts you for confirmation before running the cmdlet.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "cf" } + }, + new MarkdownParameterHelpInfo + { + Name = "WhatIf", + Description ="Shows what would happen if the cmdlet runs. The cmdlet is not run.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "wi" } + } + }; + + public static MarkdownParameterHelpInfo[] SupportsPagingParameters = + { + new MarkdownParameterHelpInfo + { + Name = "First", + Description ="Gets only the first 'n' objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "IncludeTotalCount", + Description ="Reports the number of objects in the data set (an integer) followed by the objects. If the cmdlet cannot determine the total count, it returns \"Unknown total count\".", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "Skip", + Description ="Ignores the first 'n' objects and then gets the remaining objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + } + }; + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs new file mode 100644 index 000000000000..8cc8e26f7999 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -0,0 +1,662 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal class OutputTypeOutput + { + public PSTypeName[] OutputTypes { get; } + + public OutputTypeOutput(IEnumerable outputTypes) + { + OutputTypes = outputTypes.ToArray(); + } + + public override string ToString() => OutputTypes != null && OutputTypes.Any() ? $"[OutputType({OutputTypes.Select(ot => $"[{ot}]").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class CmdletBindingOutput + { + public VariantGroup VariantGroup { get; } + + public CmdletBindingOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + + public override string ToString() + { + var dpsText = VariantGroup.DefaultParameterSetName.IsValidDefaultParameterSetName() ? $"DefaultParameterSetName='{VariantGroup.DefaultParameterSetName}'" : String.Empty; + var sspText = VariantGroup.SupportsShouldProcess ? $"SupportsShouldProcess{ItemSeparator}ConfirmImpact='Medium'" : String.Empty; + var pbText = $"PositionalBinding={false.ToPsBool()}"; + var propertyText = new[] { dpsText, pbText, sspText }.JoinIgnoreEmpty(ItemSeparator); + return $"[CmdletBinding({propertyText})]{Environment.NewLine}"; + } + } + + internal class ParameterOutput + { + public Parameter Parameter { get; } + public bool HasMultipleVariantsInVariantGroup { get; } + public bool HasAllVariantsInParameterGroup { get; } + + public ParameterOutput(Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) + { + Parameter = parameter; + HasMultipleVariantsInVariantGroup = hasMultipleVariantsInVariantGroup; + HasAllVariantsInParameterGroup = hasAllVariantsInParameterGroup; + } + + public override string ToString() + { + var psnText = HasMultipleVariantsInVariantGroup && !HasAllVariantsInParameterGroup ? $"ParameterSetName='{Parameter.VariantName}'" : String.Empty; + var positionText = Parameter.Position != null ? $"Position={Parameter.Position}" : String.Empty; + var mandatoryText = Parameter.IsMandatory ? "Mandatory" : String.Empty; + var dontShowText = Parameter.DontShow ? "DontShow" : String.Empty; + var vfpText = Parameter.ValueFromPipeline ? "ValueFromPipeline" : String.Empty; + var vfpbpnText = Parameter.ValueFromPipelineByPropertyName ? "ValueFromPipelineByPropertyName" : String.Empty; + var propertyText = new[] { psnText, positionText, mandatoryText, dontShowText, vfpText, vfpbpnText }.JoinIgnoreEmpty(ItemSeparator); + return $"{Indent}[Parameter({propertyText})]{Environment.NewLine}"; + } + } + + internal class AliasOutput + { + public string[] Aliases { get; } + public bool IncludeIndent { get; } + + public AliasOutput(string[] aliases, bool includeIndent = false) + { + Aliases = aliases; + IncludeIndent = includeIndent; + } + + public override string ToString() => Aliases?.Any() ?? false ? $"{(IncludeIndent ? Indent : String.Empty)}[Alias({Aliases.Select(an => $"'{an}'").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class ValidateNotNullOutput + { + public bool HasValidateNotNull { get; } + + public ValidateNotNullOutput(bool hasValidateNotNull) + { + HasValidateNotNull = hasValidateNotNull; + } + + public override string ToString() => HasValidateNotNull ? $"{Indent}[ValidateNotNull()]{Environment.NewLine}" : String.Empty; + } + + internal class AllowEmptyArrayOutput + { + public bool HasAllowEmptyArray { get; } + + public AllowEmptyArrayOutput(bool hasAllowEmptyArray) + { + HasAllowEmptyArray = hasAllowEmptyArray; + } + + public override string ToString() => HasAllowEmptyArray ? $"{Indent}[AllowEmptyCollection()]{Environment.NewLine}" : String.Empty; + } + internal class ArgumentCompleterOutput + { + public CompleterInfo CompleterInfo { get; } + + public ArgumentCompleterOutput(CompleterInfo completerInfo) + { + CompleterInfo = completerInfo; + } + + public override string ToString() => CompleterInfo != null + ? $"{Indent}[ArgumentCompleter({(CompleterInfo.IsTypeCompleter ? $"[{CompleterInfo.Type.Unwrap().ToPsType()}]" : $"{{{CompleterInfo.Script.ToPsSingleLine("; ")}}}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class PSArgumentCompleterOutput : ArgumentCompleterOutput + { + public PSArgumentCompleterInfo PSArgumentCompleterInfo { get; } + + public PSArgumentCompleterOutput(PSArgumentCompleterInfo completerInfo) : base(completerInfo) + { + PSArgumentCompleterInfo = completerInfo; + } + + + public override string ToString() => PSArgumentCompleterInfo != null + ? $"{Indent}[{typeof(PSArgumentCompleterAttribute)}({(PSArgumentCompleterInfo.IsTypeCompleter ? $"[{PSArgumentCompleterInfo.Type.Unwrap().ToPsType()}]" : $"{PSArgumentCompleterInfo.ResourceTypes?.Select(r => $"\"{r}\"")?.JoinIgnoreEmpty(", ")}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class DefaultInfoOutput + { + public bool HasDefaultInfo { get; } + public DefaultInfo DefaultInfo { get; } + + public DefaultInfoOutput(ParameterGroup parameterGroup) + { + HasDefaultInfo = parameterGroup.HasDefaultInfo; + DefaultInfo = parameterGroup.DefaultInfo; + } + + public override string ToString() + { + var nameText = !String.IsNullOrEmpty(DefaultInfo?.Name) ? $"Name='{DefaultInfo?.Name}'" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(DefaultInfo?.Description) ? $"Description='{DefaultInfo?.Description.ToPsStringLiteral()}'" : String.Empty; + var scriptText = !String.IsNullOrEmpty(DefaultInfo?.Script) ? $"Script='{DefaultInfo?.Script.ToPsSingleLine("; ")}'" : String.Empty; + var propertyText = new[] { nameText, descriptionText, scriptText }.JoinIgnoreEmpty(ItemSeparator); + return HasDefaultInfo ? $"{Indent}[{typeof(DefaultInfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class ParameterTypeOutput + { + public Type ParameterType { get; } + + public ParameterTypeOutput(Type parameterType) + { + ParameterType = parameterType; + } + + public override string ToString() => $"{Indent}[{ParameterType.ToPsType()}]{Environment.NewLine}"; + } + + internal class ParameterNameOutput + { + public string ParameterName { get; } + public bool IsLast { get; } + + public ParameterNameOutput(string parameterName, bool isLast) + { + ParameterName = parameterName; + IsLast = isLast; + } + + public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; + } + + internal class BaseOutput + { + public VariantGroup VariantGroup { get; } + + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + public BaseOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + public string GetProcessCustomAttributesAtRuntime() + { + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"begin {{ +{Indent}try {{ +{Indent}{Indent}$outBuffer = $null +{Indent}{Indent}if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {{ +{Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 +{Indent}{Indent}}} +{Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} +{GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} +{GetProcessCustomAttributesAtRuntime()} +{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} +{Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) +{Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} + +"; + + private string GetParameterSetToCmdletMapping() + { + var sb = new StringBuilder(); + sb.AppendLine($"{Indent}{Indent}$mapping = @{{"); + foreach (var variant in VariantGroup.Variants) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}{variant.VariantName} = '{variant.PrivateModuleName}\{variant.PrivateCmdletName}';"); + } + sb.Append($"{Indent}{Indent}}}"); + return sb.ToString(); + } + + private string GetDefaultValuesStatements() + { + var defaultInfos = VariantGroup.ParameterGroups.Where(pg => pg.HasDefaultInfo).Select(pg => pg.DefaultInfo).ToArray(); + var sb = new StringBuilder(); + + foreach (var defaultInfo in defaultInfos) + { + var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); + var parameterName = defaultInfo.ParameterGroup.ParameterName; + sb.AppendLine(); + var setCondition = " "; + if (!String.IsNullOrEmpty(defaultInfo.SetCondition)) + { + setCondition = $" -and {defaultInfo.SetCondition}"; + } + //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to + //override default value set in required readme + if ("SubscriptionId".Equals(parameterName)) + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); + sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.AppendLine($"{Indent}{Indent}{Indent}}}"); + sb.Append($"{Indent}{Indent}}}"); + } + else + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}'){setCondition}) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } + + } + return sb.ToString(); + } + + } + + internal class ProcessOutput : BaseOutput + { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"process {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.Process($_) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +{GetFinally()} +}} +"; + } + + internal class EndOutput : BaseOutput + { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.Oracle.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } + public override string ToString() => $@"end {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} +"; + } + + internal class HelpCommentOutput + { + public VariantGroup VariantGroup { get; } + public CommentInfo CommentInfo { get; } + + public HelpCommentOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + CommentInfo = variantGroup.CommentInfo; + } + + public override string ToString() + { + var inputs = String.Join(Environment.NewLine, CommentInfo.Inputs.Select(i => $".Inputs{Environment.NewLine}{i}")); + var inputsText = !String.IsNullOrEmpty(inputs) ? $"{Environment.NewLine}{inputs}" : String.Empty; + var outputs = String.Join(Environment.NewLine, CommentInfo.Outputs.Select(o => $".Outputs{Environment.NewLine}{o}")); + var outputsText = !String.IsNullOrEmpty(outputs) ? $"{Environment.NewLine}{outputs}" : String.Empty; + var notes = String.Join($"{Environment.NewLine}{Environment.NewLine}", VariantGroup.ComplexInterfaceInfos.Select(cii => cii.ToNoteOutput())); + var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; + var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); + var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var externalUrls = String.Join(Environment.NewLine, CommentInfo.ExternalUrls.Select(l => $".Link{Environment.NewLine}{l}")); + var externalUrlsText = !String.IsNullOrEmpty(externalUrls) ? $"{Environment.NewLine}{externalUrls}" : String.Empty; + var examples = ""; + foreach (var example in VariantGroup.HelpInfo.Examples) + { + examples = examples + ".Example" + "\r\n" + example.Code + "\r\n"; + } + return $@"<# +.Synopsis +{CommentInfo.Synopsis.ToDescriptionFormat(false)} +.Description +{CommentInfo.Description.ToDescriptionFormat(false)} +{examples}{inputsText}{outputsText}{notesText} +.Link +{CommentInfo.OnlineVersion}{relatedLinksText}{externalUrlsText} +#> +"; + } + } + + internal class ParameterDescriptionOutput + { + public string Description { get; } + + public ParameterDescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) + ? Description.ToDescriptionFormat(false).NormalizeNewLines() + .Split(new[] { Environment.NewLine }, StringSplitOptions.None) + .Aggregate(String.Empty, (c, n) => c + $"{Indent}# {n}{Environment.NewLine}") + : String.Empty; + } + + internal class ProfileOutput + { + public string ProfileName { get; } + + public ProfileOutput(string profileName) + { + ProfileName = profileName; + } + + public override string ToString() => ProfileName != NoProfiles ? $"[{typeof(ProfileAttribute).ToPsAttributeType()}('{ProfileName}')]{Environment.NewLine}" : String.Empty; + } + + internal class DescriptionOutput + { + public string Description { get; } + + public DescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) ? $"[{typeof(DescriptionAttribute).ToPsAttributeType()}('{Description.ToPsStringLiteral()}')]{Environment.NewLine}" : String.Empty; + } + + internal class ParameterCategoryOutput + { + public ParameterCategory Category { get; } + + public ParameterCategoryOutput(ParameterCategory category) + { + Category = category; + } + + public override string ToString() => $"{Indent}[{typeof(CategoryAttribute).ToPsAttributeType()}('{Category}')]{Environment.NewLine}"; + } + + internal class InfoOutput + { + public InfoAttribute Info { get; } + public Type ParameterType { get; } + + public InfoOutput(InfoAttribute info, Type parameterType) + { + Info = info; + ParameterType = parameterType; + } + + public override string ToString() + { + // Rendering of InfoAttribute members that are not used currently + /*var serializedNameText = Info.SerializedName != null ? $"SerializedName='{Info.SerializedName}'" : String.Empty; + var readOnlyText = Info.ReadOnly ? "ReadOnly" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(Info.Description) ? $"Description='{Info.Description.ToPsStringLiteral()}'" : String.Empty;*/ + + var requiredText = Info.Required ? "Required" : String.Empty; + var unwrappedType = ParameterType.Unwrap(); + var hasValidPossibleTypes = Info.PossibleTypes.Any(pt => pt != unwrappedType); + var possibleTypesText = hasValidPossibleTypes + ? $"PossibleTypes=({Info.PossibleTypes.Select(pt => $"[{pt.ToPsType()}]").JoinIgnoreEmpty(ItemSeparator)})" + : String.Empty; + var propertyText = new[] { /*serializedNameText, */requiredText,/* readOnlyText,*/ possibleTypesText/*, descriptionText*/ }.JoinIgnoreEmpty(ItemSeparator); + return hasValidPossibleTypes ? $"{Indent}[{typeof(InfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class PropertySyntaxOutput + { + public string ParameterName { get; } + public Type ParameterType { get; } + public bool IsMandatory { get; } + public int? Position { get; } + + public bool IncludeSpace { get; } + public bool IncludeDash { get; } + + public PropertySyntaxOutput(Parameter parameter) + { + ParameterName = parameter.ParameterName; + ParameterType = parameter.ParameterType; + IsMandatory = parameter.IsMandatory; + Position = parameter.Position; + IncludeSpace = true; + IncludeDash = true; + } + + public PropertySyntaxOutput(ComplexInterfaceInfo complexInterfaceInfo) + { + ParameterName = complexInterfaceInfo.Name; + ParameterType = complexInterfaceInfo.Type; + IsMandatory = complexInterfaceInfo.Required; + Position = null; + IncludeSpace = false; + IncludeDash = false; + } + + public override string ToString() + { + var leftOptional = !IsMandatory ? "[" : String.Empty; + var leftPositional = Position != null ? "[" : String.Empty; + var rightPositional = Position != null ? "]" : String.Empty; + var type = ParameterType != typeof(SwitchParameter) ? $" <{ParameterType.ToSyntaxTypeName()}>" : String.Empty; + var rightOptional = !IsMandatory ? "]" : String.Empty; + var space = IncludeSpace ? " " : String.Empty; + var dash = IncludeDash ? "-" : String.Empty; + return $"{space}{leftOptional}{leftPositional}{dash}{ParameterName}{rightPositional}{type}{rightOptional}"; + } + } + + internal static class PsProxyOutputExtensions + { + public const string NoParameters = "__NoParameters"; + + public const string AllParameterSets = "__AllParameterSets"; + + public const string HalfIndent = " "; + + public const string Indent = HalfIndent + HalfIndent; + + public const string ItemSeparator = ", "; + + public static readonly string ComplexParameterHeader = $"COMPLEX PARAMETER PROPERTIES{Environment.NewLine}{Environment.NewLine}To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.{Environment.NewLine}{Environment.NewLine}"; + + public static string ToPsBool(this bool value) => $"${value.ToString().ToLowerInvariant()}"; + + public static string ToPsType(this Type type) + { + var regex = new Regex(@"^(.*)`{1}\d+(.*)$"); + var typeText = type.ToString(); + var match = regex.Match(typeText); + return match.Success ? $"{match.Groups[1]}{match.Groups[2]}" : typeText; + } + + public static string ToPsAttributeType(this Type type) => type.ToPsType().RemoveEnd("Attribute"); + + // https://stackoverflow.com/a/5284606/294804 + private static string RemoveEnd(this string text, string suffix) => text.EndsWith(suffix) ? text.Substring(0, text.Length - suffix.Length) : text; + + public static string ToPsSingleLine(this string value, string replacer = " ") => value.ReplaceNewLines(replacer, new[] { "
", "\r\n", "\n" }); + + public static string ToPsStringLiteral(this string value) => value?.Replace("'", "''").Replace("‘", "''").Replace("’", "''").ToPsSingleLine().Trim() ?? String.Empty; + + public static string JoinIgnoreEmpty(this IEnumerable values, string separator) => String.Join(separator, values?.Where(v => !String.IsNullOrEmpty(v))); + + // https://stackoverflow.com/a/41961738/294804 + public static string ToSyntaxTypeName(this Type type) + { + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + return $"{type.GetGenericArguments().First().ToSyntaxTypeName()}?"; + } + + if (type.IsGenericType) + { + var genericTypes = String.Join(ItemSeparator, type.GetGenericArguments().Select(ToSyntaxTypeName)); + return $"{type.Name.Split('`').First()}<{genericTypes}>"; + } + + return type.Name; + } + + public static OutputTypeOutput ToOutputTypeOutput(this IEnumerable outputTypes) => new OutputTypeOutput(outputTypes); + + public static CmdletBindingOutput ToCmdletBindingOutput(this VariantGroup variantGroup) => new CmdletBindingOutput(variantGroup); + + public static ParameterOutput ToParameterOutput(this Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) => new ParameterOutput(parameter, hasMultipleVariantsInVariantGroup, hasAllVariantsInParameterGroup); + + public static AliasOutput ToAliasOutput(this string[] aliases, bool includeIndent = false) => new AliasOutput(aliases, includeIndent); + + public static ValidateNotNullOutput ToValidateNotNullOutput(this bool hasValidateNotNull) => new ValidateNotNullOutput(hasValidateNotNull); + + public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); + + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => (completerInfo is PSArgumentCompleterInfo psArgumentCompleterInfo) ? psArgumentCompleterInfo.ToArgumentCompleterOutput() : new ArgumentCompleterOutput(completerInfo); + + public static PSArgumentCompleterOutput ToArgumentCompleterOutput(this PSArgumentCompleterInfo completerInfo) => new PSArgumentCompleterOutput(completerInfo); + + public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); + + public static ParameterTypeOutput ToParameterTypeOutput(this Type parameterType) => new ParameterTypeOutput(parameterType); + + public static ParameterNameOutput ToParameterNameOutput(this string parameterName, bool isLast) => new ParameterNameOutput(parameterName, isLast); + + public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); + + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); + + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); + + public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); + + public static ParameterDescriptionOutput ToParameterDescriptionOutput(this string description) => new ParameterDescriptionOutput(description); + + public static ProfileOutput ToProfileOutput(this string profileName) => new ProfileOutput(profileName); + + public static DescriptionOutput ToDescriptionOutput(this string description) => new DescriptionOutput(description); + + public static ParameterCategoryOutput ToParameterCategoryOutput(this ParameterCategory category) => new ParameterCategoryOutput(category); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this Parameter parameter) => new PropertySyntaxOutput(parameter); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this ComplexInterfaceInfo complexInterfaceInfo) => new PropertySyntaxOutput(complexInterfaceInfo); + + public static InfoOutput ToInfoOutput(this InfoAttribute info, Type parameterType) => new InfoOutput(info, parameterType); + + public static string ToNoteOutput(this ComplexInterfaceInfo complexInterfaceInfo, string currentIndent = "", bool includeDashes = false, bool includeBackticks = false, bool isFirst = true) + { + string RenderProperty(ComplexInterfaceInfo info, string indent, bool dash, bool backtick) => + $"{indent}{(dash ? "- " : String.Empty)}{(backtick ? "`" : String.Empty)}{info.ToPropertySyntaxOutput()}{(backtick ? "`" : String.Empty)}: {info.Description}"; + + var nested = complexInterfaceInfo.NestedInfos.Select(ni => + { + var nestedIndent = $"{currentIndent}{HalfIndent}"; + return ni.IsComplexInterface + ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false) + : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks); + }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks)); + return String.Join(Environment.NewLine, nested); + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs new file mode 100644 index 000000000000..4efc7b0b9f15 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -0,0 +1,544 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal class ProfileGroup + { + public string ProfileName { get; } + public Variant[] Variants { get; } + public string ProfileFolder { get; } + + public ProfileGroup(Variant[] variants, string profileName = NoProfiles) + { + ProfileName = profileName; + Variants = variants; + ProfileFolder = ProfileName != NoProfiles ? ProfileName : String.Empty; + } + } + + internal class VariantGroup + { + public string ModuleName { get; } + + public string RootModuleName { get => @""; } + public string CmdletName { get; } + public string CmdletVerb { get; } + public string CmdletNoun { get; } + public string ProfileName { get; } + public Variant[] Variants { get; } + public ParameterGroup[] ParameterGroups { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + + public string[] Aliases { get; } + public PSTypeName[] OutputTypes { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + public string DefaultParameterSetName { get; } + public bool HasMultipleVariants { get; } + public PsHelpInfo HelpInfo { get; } + public bool IsGenerated { get; } + public bool IsInternal { get; } + public string OutputFolder { get; } + public string FileName { get; } + public string FilePath { get; } + + public CommentInfo CommentInfo { get; } + + public VariantGroup(string moduleName, string cmdletName, Variant[] variants, string outputFolder, string profileName = NoProfiles, bool isTest = false, bool isInternal = false) + { + ModuleName = moduleName; + CmdletName = cmdletName; + var cmdletNameParts = CmdletName.Split('-'); + CmdletVerb = cmdletNameParts.First(); + CmdletNoun = cmdletNameParts.Last(); + ProfileName = profileName; + Variants = variants; + ParameterGroups = Variants.ToParameterGroups().OrderBy(pg => pg.OrderCategory).ThenByDescending(pg => pg.IsMandatory).ToArray(); + var aliasDuplicates = ParameterGroups.SelectMany(pg => pg.Aliases) + //https://stackoverflow.com/a/18547390/294804 + .GroupBy(a => a).Where(g => g.Count() > 1).Select(g => g.Key).ToArray(); + if (aliasDuplicates.Any()) + { + throw new ParsingMetadataException($"The alias(es) [{String.Join(", ", aliasDuplicates)}] are defined on multiple parameters for cmdlet '{CmdletName}', which is not supported."); + } + ComplexInterfaceInfos = ParameterGroups.Where(pg => !pg.DontShow && pg.IsComplexInterface).OrderBy(pg => pg.ParameterName).Select(pg => pg.ComplexInterfaceInfo).ToArray(); + + Aliases = Variants.SelectMany(v => v.Attributes).ToAliasNames().ToArray(); + OutputTypes = Variants.SelectMany(v => v.Info.OutputType).Where(ot => ot.Type != null).GroupBy(ot => ot.Type).Select(otg => otg.First()).ToArray(); + SupportsShouldProcess = Variants.Any(v => v.SupportsShouldProcess); + SupportsPaging = Variants.Any(v => v.SupportsPaging); + DefaultParameterSetName = DetermineDefaultParameterSetName(); + HasMultipleVariants = Variants.Length > 1; + HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); + IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); + IsInternal = isInternal; + OutputFolder = outputFolder; + FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; + FilePath = Path.Combine(OutputFolder, FileName); + + CommentInfo = new CommentInfo(this); + } + + private string DetermineDefaultParameterSetName() + { + var defaultParameterSet = Variants + .Select(v => v.Metadata.DefaultParameterSetName) + .LastOrDefault(dpsn => dpsn.IsValidDefaultParameterSetName()); + + if (String.IsNullOrEmpty(defaultParameterSet)) + { + var variantParamCountGroups = Variants + .Where(v => !v.IsNotSuggestDefaultParameterSet) + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + if (variantParamCountGroups.Length == 0) + { + variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + } + var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); + var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); + defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; + } + + return defaultParameterSet; + } + } + + internal class Variant + { + public string CmdletName { get; } + public string VariantName { get; } + public CommandInfo Info { get; } + public CommandMetadata Metadata { get; } + public PsHelpInfo HelpInfo { get; } + public bool HasParameterSets { get; } + public bool IsFunction { get; } + public string PrivateModuleName { get; } + public string PrivateCmdletName { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public Attribute[] Attributes { get; } + public Parameter[] Parameters { get; } + public Parameter[] CmdletOnlyParameters { get; } + public bool IsInternal { get; } + public bool IsDoNotExport { get; } + public bool IsNotSuggestDefaultParameterSet { get; } + public string[] Profiles { get; } + + public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) + { + CmdletName = cmdletName; + VariantName = variantName; + Info = info; + HelpInfo = helpInfo ?? new PsHelpInfo(); + Metadata = metadata; + HasParameterSets = hasParameterSets; + IsFunction = Info.CommandType == CommandTypes.Function; + PrivateModuleName = Info.Source; + PrivateCmdletName = Metadata.Name; + SupportsShouldProcess = Metadata.SupportsShouldProcess; + SupportsPaging = Metadata.SupportsPaging; + + Attributes = this.ToAttributes(); + Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); + IsInternal = Attributes.OfType().Any(); + IsDoNotExport = Attributes.OfType().Any(); + IsNotSuggestDefaultParameterSet = Attributes.OfType().Any(); + CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); + Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); + } + } + + internal class ParameterGroup + { + public string ParameterName { get; } + public Parameter[] Parameters { get; } + + public string[] VariantNames { get; } + public string[] AllVariantNames { get; } + public bool HasAllVariants { get; } + public Type ParameterType { get; } + public string Description { get; } + + public string[] Aliases { get; } + public bool HasValidateNotNull { get; } + public bool HasAllowEmptyArray { get; } + public CompleterInfo CompleterInfo { get; } + public DefaultInfo DefaultInfo { get; } + public bool HasDefaultInfo { get; } + public ParameterCategory OrderCategory { get; } + public bool DontShow { get; } + public bool IsMandatory { get; } + public bool SupportsWildcards { get; } + public bool IsComplexInterface { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public InfoAttribute InfoAttribute { get; } + + public int? FirstPosition { get; } + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public bool IsInputType { get; } + + public ParameterGroup(string parameterName, Parameter[] parameters, string[] allVariantNames) + { + ParameterName = parameterName; + Parameters = parameters; + + VariantNames = Parameters.Select(p => p.VariantName).ToArray(); + AllVariantNames = allVariantNames; + HasAllVariants = VariantNames.Any(vn => vn == AllParameterSets) || !AllVariantNames.Except(VariantNames).Any(); + var types = Parameters.Select(p => p.ParameterType).Distinct().ToArray(); + if (types.Length > 1) + { + throw new ParsingMetadataException($"The parameter '{ParameterName}' has multiple parameter types [{String.Join(", ", types.Select(t => t.Name))}] defined, which is not supported."); + } + ParameterType = types.First(); + Description = Parameters.Select(p => p.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + + Aliases = Parameters.SelectMany(p => p.Attributes).ToAliasNames().ToArray(); + HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.PSArgumentCompleterAttribute).FirstOrDefault()?.ToPSArgumentCompleterInfo() + ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); + DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) + ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); + HasDefaultInfo = DefaultInfo != null && !String.IsNullOrEmpty(DefaultInfo.Script); + // When DefaultInfo is present, force all parameters from this group to be optional. + if (HasDefaultInfo) + { + foreach (var parameter in Parameters) + { + parameter.IsMandatory = false; + } + } + OrderCategory = Parameters.Select(p => p.OrderCategory).Distinct().DefaultIfEmpty(ParameterCategory.Body).Min(); + DontShow = Parameters.All(p => p.DontShow); + IsMandatory = HasAllVariants && Parameters.Any(p => p.IsMandatory); + SupportsWildcards = Parameters.Any(p => p.SupportsWildcards); + IsComplexInterface = Parameters.Any(p => p.IsComplexInterface); + ComplexInterfaceInfo = Parameters.Where(p => p.IsComplexInterface).Select(p => p.ComplexInterfaceInfo).FirstOrDefault(); + InfoAttribute = Parameters.Select(p => p.InfoAttribute).First(); + + FirstPosition = Parameters.Select(p => p.Position).FirstOrDefault(p => p != null); + ValueFromPipeline = Parameters.Any(p => p.ValueFromPipeline); + ValueFromPipelineByPropertyName = Parameters.Any(p => p.ValueFromPipelineByPropertyName); + IsInputType = ValueFromPipeline || ValueFromPipelineByPropertyName; + } + } + + internal class Parameter + { + public string VariantName { get; } + public string ParameterName { get; } + public ParameterMetadata Metadata { get; } + public PsParameterHelpInfo HelpInfo { get; } + public Type ParameterType { get; } + public Attribute[] Attributes { get; } + public ParameterCategory[] Categories { get; } + public ParameterCategory OrderCategory { get; } + public PSDefaultValueAttribute DefaultValueAttribute { get; } + public DefaultInfoAttribute DefaultInfoAttribute { get; } + public ParameterAttribute ParameterAttribute { get; } + public bool SupportsWildcards { get; } + public CompleterInfoAttribute CompleterInfoAttribute { get; } + public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + public PSArgumentCompleterAttribute PSArgumentCompleterAttribute { get; } + + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public int? Position { get; } + public bool DontShow { get; } + public bool IsMandatory { get; set; } + + public InfoAttribute InfoAttribute { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public bool IsComplexInterface { get; } + public string Description { get; } + + public Parameter(string variantName, string parameterName, ParameterMetadata metadata, PsParameterHelpInfo helpInfo = null) + { + VariantName = variantName; + ParameterName = parameterName; + Metadata = metadata; + HelpInfo = helpInfo ?? new PsParameterHelpInfo(); + + Attributes = Metadata.Attributes.ToArray(); + ParameterType = Attributes.OfType().FirstOrDefault()?.Type ?? Metadata.ParameterType; + Categories = Attributes.OfType().SelectMany(ca => ca.Categories).Distinct().ToArray(); + OrderCategory = Categories.DefaultIfEmpty(ParameterCategory.Body).Min(); + DefaultValueAttribute = Attributes.OfType().FirstOrDefault(); + DefaultInfoAttribute = Attributes.OfType().FirstOrDefault(); + ParameterAttribute = Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == VariantName || pa.ParameterSetName == AllParameterSets); + if (ParameterAttribute == null) + { + throw new ParsingMetadataException($"The variant '{VariantName}' has multiple parameter sets defined, which is not supported."); + } + SupportsWildcards = Attributes.OfType().Any(); + CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); + PSArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(attr => !attr.GetType().Equals(typeof(PSArgumentCompleterAttribute))); + + ValueFromPipeline = ParameterAttribute.ValueFromPipeline; + ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; + Position = ParameterAttribute.Position == Int32.MinValue ? (int?)null : ParameterAttribute.Position; + DontShow = ParameterAttribute.DontShow; + IsMandatory = ParameterAttribute.Mandatory; + + var complexParameterName = ParameterName.ToUpperInvariant(); + var complexMessage = $"{Environment.NewLine}"; + var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; + // Remove the complex type message as it will be reinserted if this is a complex type + description = description.NormalizeNewLines(); + // Make an InfoAttribute for processing only if one isn't provided + InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; + // Set the description if the InfoAttribute does not have one since they are exported without a description + InfoAttribute.Description = String.IsNullOrEmpty(InfoAttribute.Description) ? description : InfoAttribute.Description; + ComplexInterfaceInfo = InfoAttribute.ToComplexInterfaceInfo(complexParameterName, ParameterType, true); + IsComplexInterface = ComplexInterfaceInfo.IsComplexInterface; + Description = $"{description}{(IsComplexInterface ? complexMessage : String.Empty)}"; + } + } + + internal class ComplexInterfaceInfo + { + public InfoAttribute InfoAttribute { get; } + + public string Name { get; } + public Type Type { get; } + public bool Required { get; } + public bool ReadOnly { get; } + public string Description { get; } + + public ComplexInterfaceInfo[] NestedInfos { get; } + public bool IsComplexInterface { get; } + + public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, bool? required, List seenTypes) + { + Name = name; + Type = type; + InfoAttribute = infoAttribute; + + Required = required ?? InfoAttribute.Required; + ReadOnly = InfoAttribute.ReadOnly; + Description = InfoAttribute.Description.ToPsSingleLine(); + + var unwrappedType = Type.Unwrap(); + var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; + (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : + unwrappedType.GetInterfaces() + .Concat(InfoAttribute.PossibleTypes) + .SelectMany(pt => pt.GetProperties() + .SelectMany(pi => pi.GetCustomAttributes(true).OfType() + .Select(ia => ia.ToComplexInterfaceInfo(pi.Name, pi.PropertyType, seenTypes: seenTypes)))) + .Where(cii => !cii.ReadOnly).OrderByDescending(cii => cii.Required).ToArray(); + // https://stackoverflow.com/a/503359/294804 + var associativeArrayInnerType = Type.GetInterfaces() + .FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>)) + ?.GetTypeInfo().GetGenericArguments().First(); + if (!hasBeenSeen && associativeArrayInnerType != null) + { + var anyInfo = new InfoAttribute { Description = "This indicates any property can be added to this object." }; + NestedInfos = NestedInfos.Prepend(anyInfo.ToComplexInterfaceInfo("(Any)", associativeArrayInnerType)).ToArray(); + } + IsComplexInterface = NestedInfos.Any(); + } + } + + internal class CommentInfo + { + public string Description { get; } + public string Synopsis { get; } + + public string[] Examples { get; } + public string[] Inputs { get; } + public string[] Outputs { get; } + + public string OnlineVersion { get; } + public string[] RelatedLinks { get; } + public string[] ExternalUrls { get; } + + private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; + + public CommentInfo(VariantGroup variantGroup) + { + var helpInfo = variantGroup.HelpInfo; + Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() + ?? helpInfo.Description.EmptyIfNull(); + // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. + var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; + Synopsis = synopsis.NullIfEmpty() ?? Description; + + Examples = helpInfo.Examples.Select(rl => rl.Code).ToArray(); + + Inputs = (variantGroup.ParameterGroups.Where(pg => pg.IsInputType).Select(pg => pg.ParameterType.FullName).ToArray().NullIfEmpty() ?? + helpInfo.InputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(it => it.Name).ToArray()) + .Where(i => i != "None").Distinct().OrderBy(i => i).ToArray(); + Outputs = (variantGroup.OutputTypes.Select(ot => ot.Type.FullName).ToArray().NullIfEmpty() ?? + helpInfo.OutputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(ot => ot.Name).ToArray()) + .Where(o => o != "None").Distinct().OrderBy(o => o).ToArray(); + + // Use root module name in the help link + var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); + OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; + RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + + // Get external urls from attribute + ExternalUrls = variantGroup.Variants.SelectMany(v => v.Attributes).OfType()?.Select(e => e.Url)?.Distinct()?.ToArray(); + } + } + + internal class CompleterInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public Type Type { get; } + public bool IsTypeCompleter { get; } + + public CompleterInfo(CompleterInfoAttribute infoAttribute) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + } + + public CompleterInfo(ArgumentCompleterAttribute completerAttribute) + { + Script = completerAttribute.ScriptBlock?.ToString(); + if (completerAttribute.Type != null) + { + Type = completerAttribute.Type; + IsTypeCompleter = true; + } + } + } + + internal class PSArgumentCompleterInfo : CompleterInfo + { + public string[] ResourceTypes { get; } + + public PSArgumentCompleterInfo(PSArgumentCompleterAttribute completerAttribute) : base(completerAttribute) + { + ResourceTypes = completerAttribute.ResourceTypes; + } + } + + internal class DefaultInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public string SetCondition { get; } + public ParameterGroup ParameterGroup { get; } + + public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + SetCondition = infoAttribute.SetCondition; + ParameterGroup = parameterGroup; + } + + public DefaultInfo(PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) + { + Description = defaultValueAttribute.Help; + ParameterGroup = parameterGroup; + if (defaultValueAttribute.Value != null) + { + Script = defaultValueAttribute.Value.ToString(); + } + } + } + + internal static class PsProxyTypeExtensions + { + public const string NoProfiles = "__NoProfiles"; + + public static bool IsValidDefaultParameterSetName(this string parameterSetName) => + !String.IsNullOrEmpty(parameterSetName) && parameterSetName != AllParameterSets; + + public static Variant[] ToVariants(this CommandInfo info, PsHelpInfo helpInfo) + { + var metadata = new CommandMetadata(info); + var privateCmdletName = metadata.Name.Split('!').First(); + var parts = privateCmdletName.Split('_'); + return parts.Length > 1 + ? new[] { new Variant(parts[0], parts[1], info, metadata, helpInfo: helpInfo) } + // Process multiple parameter sets, so we declare a variant per parameter set. + : info.ParameterSets.Select(ps => new Variant(privateCmdletName, ps.Name, info, metadata, true, helpInfo)).ToArray(); + } + + public static Variant[] ToVariants(this CmdletAndHelpInfo info) => info.CommandInfo.ToVariants(info.HelpInfo); + + public static Variant[] ToVariants(this CommandInfo info, PSObject helpInfo = null) => info.ToVariants(helpInfo?.ToPsHelpInfo()); + + public static Parameter[] ToParameters(this Variant variant) + { + var parameters = variant.Metadata.Parameters.AsEnumerable(); + var parameterHelp = variant.HelpInfo.Parameters.AsEnumerable(); + + if (variant.HasParameterSets) + { + parameters = parameters.Where(p => p.Value.ParameterSets.Keys.Any(k => k == variant.VariantName || k == AllParameterSets)); + parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); + } + var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); + if (variant.SupportsPaging) + { + // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters + variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; + variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; + result = result.Append(new Parameter(variant.VariantName, "First", variant.Info.Parameters["First"], parameterHelp.FirstOrDefault(ph => ph.Name == "First"))); + result = result.Append(new Parameter(variant.VariantName, "Skip", variant.Info.Parameters["Skip"], parameterHelp.FirstOrDefault(ph => ph.Name == "Skip"))); + } + return result.ToArray(); + } + + public static Attribute[] ToAttributes(this Variant variant) => variant.IsFunction + ? ((FunctionInfo)variant.Info).ScriptBlock.Attributes.ToArray() + : variant.Metadata.CommandType.GetCustomAttributes(false).Cast().ToArray(); + + public static IEnumerable ToParameterGroups(this Variant[] variants) + { + var allVariantNames = variants.Select(vg => vg.VariantName).ToArray(); + return variants + .SelectMany(v => v.Parameters) + .GroupBy(p => p.ParameterName, StringComparer.InvariantCultureIgnoreCase) + .Select(pg => new ParameterGroup(pg.Key, pg.Select(p => p).ToArray(), allVariantNames)); + } + + public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute infoAttribute, string name, Type type, bool? required = null, List seenTypes = null) + => new ComplexInterfaceInfo(name, type, infoAttribute, required, seenTypes); + + public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); + public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); + public static PSArgumentCompleterInfo ToPSArgumentCompleterInfo(this PSArgumentCompleterAttribute completerAttribute) => new PSArgumentCompleterInfo(completerAttribute); + public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); + public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsAttributes.cs new file mode 100644 index 000000000000..4bc07e555d2b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -0,0 +1,131 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle +{ + [AttributeUsage(AttributeTargets.Class)] + public class DescriptionAttribute : Attribute + { + public string Description { get; } + + public DescriptionAttribute(string description) + { + Description = description; + } + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class InternalExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class GeneratedAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotFormatAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class ProfileAttribute : Attribute + { + public string[] Profiles { get; } + + public ProfileAttribute(params string[] profiles) + { + Profiles = profiles; + } + } + + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + + [AttributeUsage(AttributeTargets.Class)] + public class NotSuggestDefaultParameterSetAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class CategoryAttribute : Attribute + { + public ParameterCategory[] Categories { get; } + + public CategoryAttribute(params ParameterCategory[] categories) + { + Categories = categories; + } + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ExportAsAttribute : Attribute + { + public Type Type { get; set; } + + public ExportAsAttribute(Type type) + { + Type = type; + } + } + + public enum ParameterCategory + { + // Note: Order is significant + Uri = 0, + Path, + Query, + Header, + Cookie, + Body, + Azure, + Runtime + } + + [AttributeUsage(AttributeTargets.Property)] + public class OriginAttribute : Attribute + { + public PropertyOrigin Origin { get; } + + public OriginAttribute(PropertyOrigin origin) + { + Origin = origin; + } + } + + public enum PropertyOrigin + { + // Note: Order is significant + Inherited = 0, + Owned, + Inlined + } + + [AttributeUsage(AttributeTargets.Property)] + public class ConstantAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Property)] + public class FormatTableAttribute : Attribute + { + public int Index { get; set; } = -1; + public bool HasIndex => Index != -1; + public string Label { get; set; } + public int Width { get; set; } = -1; + public bool HasWidth => Width != -1; + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsExtensions.cs new file mode 100644 index 000000000000..073c79b974cb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsExtensions.cs @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal static class PsExtensions + { + public static PSObject AddMultipleTypeNameIntoPSObject(this object obj, string multipleTag = "#Multiple") + { + var psObj = new PSObject(obj); + psObj.TypeNames.Insert(0, $"{psObj.TypeNames[0]}{multipleTag}"); + return psObj; + } + + // https://stackoverflow.com/a/863944/294804 + // https://stackoverflow.com/a/4452598/294804 + // https://stackoverflow.com/a/28701974/294804 + // Note: This will unwrap nested collections, but we don't generate nested collections. + public static Type Unwrap(this Type type) + { + if (type.IsArray) + { + return type.GetElementType().Unwrap(); + } + + var typeInfo = type.GetTypeInfo(); + if (typeInfo.IsGenericType + && (typeInfo.GetGenericTypeDefinition() == typeof(Nullable<>) || typeof(IEnumerable<>).IsAssignableFrom(type))) + { + return typeInfo.GetGenericArguments().First().Unwrap(); + } + + return type; + } + + // https://stackoverflow.com/a/863944/294804 + private static bool IsSimple(this Type type) + { + var typeInfo = type.GetTypeInfo(); + return typeInfo.IsPrimitive + || typeInfo.IsEnum + || type == typeof(string) + || type == typeof(decimal); + } + + // https://stackoverflow.com/a/32025393/294804 + private static bool HasImplicitConversion(this Type baseType, Type targetType) => + baseType.GetMethods(BindingFlags.Public | BindingFlags.Static) + .Where(mi => mi.Name == "op_Implicit" && mi.ReturnType == targetType) + .Any(mi => mi.GetParameters().FirstOrDefault()?.ParameterType == baseType); + + public static bool IsPsSimple(this Type type) + { + var unwrappedType = type.Unwrap(); + return unwrappedType.IsSimple() + || unwrappedType == typeof(SwitchParameter) + || unwrappedType == typeof(Hashtable) + || unwrappedType == typeof(PSCredential) + || unwrappedType == typeof(ScriptBlock) + || unwrappedType == typeof(DateTime) + || unwrappedType == typeof(Uri) + || unwrappedType.HasImplicitConversion(typeof(string)); + } + + public static string ToPsList(this IEnumerable items) => String.Join(", ", items.Select(i => $"'{i}'")); + + public static IEnumerable ToAliasNames(this IEnumerable attributes) => attributes.OfType().SelectMany(aa => aa.AliasNames).Distinct(); + + public static bool IsArrayAndElementTypeIsT(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return itemType.IsArray && !tType.IsArray && tType.IsAssignableFrom(itemType.GetElementType()); + } + + public static bool IsTArrayAndElementTypeIsItem(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return !itemType.IsArray && tType.IsArray && (tType.GetElementType()?.IsAssignableFrom(itemType) ?? false); + } + + public static bool IsTypeOrArrayOfType(this object item) => item is T || item.IsArrayAndElementTypeIsT() || item.IsTArrayAndElementTypeIsItem(); + + public static T NormalizeArrayType(this object item) + { + if (item is T result) + { + return result; + } + + if (item.IsArrayAndElementTypeIsT()) + { + var array = (T[])Convert.ChangeType(item, typeof(T[])); + return array.FirstOrDefault(); + } + + if (item.IsTArrayAndElementTypeIsItem()) + { + var tType = typeof(T); + var array = Array.CreateInstance(tType.GetElementType(), 1); + array.SetValue(item, 0); + return (T)Convert.ChangeType(array, tType); + } + + return default(T); + } + + public static T GetNestedProperty(this PSObject psObject, params string[] names) => psObject.Properties.GetNestedProperty(names); + + public static T GetNestedProperty(this PSMemberInfoCollection properties, params string[] names) + { + var lastName = names.Last(); + var nestedProperties = names.Take(names.Length - 1).Aggregate(properties, (p, n) => p?.GetProperty(n)?.Properties); + return nestedProperties != null ? nestedProperties.GetProperty(lastName) : default(T); + } + + public static T GetProperty(this PSObject psObject, string name) => psObject.Properties.GetProperty(name); + + public static T GetProperty(this PSMemberInfoCollection properties, string name) + { + switch (properties[name]?.Value) + { + case PSObject psObject when psObject.BaseObject is PSCustomObject && psObject.ImmediateBaseObject.IsTypeOrArrayOfType(): + return psObject.ImmediateBaseObject.NormalizeArrayType(); + case PSObject psObject when psObject.BaseObject.IsTypeOrArrayOfType(): + return psObject.BaseObject.NormalizeArrayType(); + case object value when value.IsTypeOrArrayOfType(): + return value.NormalizeArrayType(); + default: + return default(T); + } + } + + public static IEnumerable RunScript(this PSCmdlet cmdlet, string script) + => PsHelpers.RunScript(cmdlet.InvokeCommand, script); + + public static void RunScript(this PSCmdlet cmdlet, string script) + => cmdlet.RunScript(script); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, string script) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, script); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, string script) + => engineIntrinsics.RunScript(script); + + public static IEnumerable RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => PsHelpers.RunScript(cmdlet.InvokeCommand, block.ToString()); + + public static void RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => cmdlet.RunScript(block.ToString()); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, block.ToString()); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => engineIntrinsics.RunScript(block.ToString()); + + /// + /// Returns if a parameter should be hidden by checking for . + /// + /// A PowerShell parameter. + public static bool IsHidden(this Parameter parameter) + { + return parameter.Attributes.Any(attr => attr is DoNotExportAttribute); + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsHelpers.cs new file mode 100644 index 000000000000..b9ea9d6aed31 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -0,0 +1,105 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Pwsh = System.Management.Automation.PowerShell; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal static class PsHelpers + { + public static IEnumerable RunScript(string script) + => Pwsh.Create().AddScript(script).Invoke(); + + public static void RunScript(string script) + => RunScript(script); + + public static IEnumerable RunScript(CommandInvocationIntrinsics cii, string script) + => cii.InvokeScript(script).Select(o => o?.BaseObject).Where(o => o != null).OfType(); + + public static void RunScript(CommandInvocationIntrinsics cii, string script) + => RunScript(cii, script); + + public static IEnumerable GetModuleCmdlets(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletsCommand = String.Join(" + ", modulePaths.Select(mp => $"(Get-Command -Module (Import-Module '{mp}' -PassThru))")); + return (cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand)) + .Where(ci => ci.CommandType != CommandTypes.Alias); + } + + public static IEnumerable GetModuleCmdlets(params string[] modulePaths) + => GetModuleCmdlets(null, modulePaths); + + public static IEnumerable GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder) + { + // https://stackoverflow.com/a/40969712/294804 + var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'"; + var getCmdletsCommand = $@" +$currentFunctions = Get-ChildItem function: +Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} +"; + return cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand); + } + + public static IEnumerable GetScriptCmdlets(string scriptFolder) + => GetScriptCmdlets(null, scriptFolder); + + public static IEnumerable GetScriptHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var importModules = String.Join(Environment.NewLine, modulePaths.Select(mp => $"Import-Module '{mp}'")); + var getHelpCommand = $@" +$currentFunctions = Get-ChildItem function: +{importModules} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} | ForEach-Object {{ Get-Help -Name $_.Name -Full }} +"; + return cmdlet?.RunScript(getHelpCommand) ?? RunScript(getHelpCommand); + } + + public static IEnumerable GetScriptHelpInfo(params string[] modulePaths) + => GetScriptHelpInfo(null, modulePaths); + + public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" + )); + return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) + .Select(h => new CmdletAndHelpInfo { CommandInfo = (h["CommandInfo"] as PSObject)?.BaseObject as CommandInfo, HelpInfo = h["HelpInfo"] as PSObject }); + } + + public static IEnumerable GetModuleCmdletsAndHelpInfo(params string[] modulePaths) + => GetModuleCmdletsAndHelpInfo(null, modulePaths); + + public static CmdletAndHelpInfo ToCmdletAndHelpInfo(this CommandInfo commandInfo, PSObject helpInfo) => new CmdletAndHelpInfo { CommandInfo = commandInfo, HelpInfo = helpInfo }; + + public const string Psd1Indent = " "; + public const string GuidStart = Psd1Indent + "GUID"; + + public static Guid ReadGuidFromPsd1(string psd1Path) + { + var guid = Guid.NewGuid(); + if (File.Exists(psd1Path)) + { + var currentGuid = File.ReadAllLines(psd1Path) + .FirstOrDefault(l => l.TrimStart().StartsWith(GuidStart.TrimStart()))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .LastOrDefault()?.Replace("'", String.Empty); + guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; + } + + return guid; + } + } + + internal class CmdletAndHelpInfo + { + public CommandInfo CommandInfo { get; set; } + public PSObject HelpInfo { get; set; } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/StringExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/StringExtensions.cs new file mode 100644 index 000000000000..9aedcced0a5b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/StringExtensions.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal static class StringExtensions + { + public static string NullIfEmpty(this string text) => String.IsNullOrEmpty(text) ? null : text; + public static string NullIfWhiteSpace(this string text) => String.IsNullOrWhiteSpace(text) ? null : text; + public static string EmptyIfNull(this string text) => text ?? String.Empty; + + public static bool? ToNullableBool(this string text) => String.IsNullOrEmpty(text) ? (bool?)null : Convert.ToBoolean(text.ToLowerInvariant()); + + public static string ToUpperFirstCharacter(this string text) => String.IsNullOrEmpty(text) ? text : $"{text[0].ToString().ToUpperInvariant()}{text.Remove(0, 1)}"; + + public static string ReplaceNewLines(this string value, string replacer = " ", string[] newLineSymbols = null) + => (newLineSymbols ?? new []{ "\r\n", "\n" }).Aggregate(value.EmptyIfNull(), (current, symbol) => current.Replace(symbol, replacer)); + public static string NormalizeNewLines(this string value) => value.ReplaceNewLines("\u00A0").Replace("\u00A0", Environment.NewLine); + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/XmlExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/XmlExtensions.cs new file mode 100644 index 000000000000..67d4539473e3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/BuildTime/XmlExtensions.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal static class XmlExtensions + { + public static string ToXmlString(this T inputObject, bool excludeDeclaration = false) + { + var serializer = new XmlSerializer(typeof(T)); + //https://stackoverflow.com/a/760290/294804 + //https://stackoverflow.com/a/3732234/294804 + var namespaces = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }); + var xmlSettings = new XmlWriterSettings { OmitXmlDeclaration = excludeDeclaration, Indent = true }; + using (var stringWriter = new StringWriter()) + using (var xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) + { + serializer.Serialize(xmlWriter, inputObject, namespaces); + return stringWriter.ToString(); + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/CmdInfoHandler.cs b/src/Oracle/Oracle.Autorest/generated/runtime/CmdInfoHandler.cs new file mode 100644 index 000000000000..11426784c430 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/CmdInfoHandler.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Management.Automation; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using NextDelegate = Func, Task>, Task>; + using SignalDelegate = Func, Task>; + + public class CmdInfoHandler + { + private readonly string processRecordId; + private readonly string parameterSetName; + private readonly InvocationInfo invocationInfo; + + public CmdInfoHandler(string processRecordId, InvocationInfo invocationInfo, string parameterSetName) + { + this.processRecordId = processRecordId; + this.parameterSetName = parameterSetName; + this.invocationInfo = invocationInfo; + } + + public Task SendAsync(HttpRequestMessage request, CancellationToken token, Action cancel, SignalDelegate signal, NextDelegate next) + { + request.Headers.Add("x-ms-client-request-id", processRecordId); + request.Headers.Add("CommandName", invocationInfo?.InvocationName); + request.Headers.Add("FullCommandName", invocationInfo?.MyCommand?.Name); + request.Headers.Add("ParameterSetName", parameterSetName); + + // continue with pipeline. + return next(request, token, cancel, signal); + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Context.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Context.cs new file mode 100644 index 000000000000..6bf8225cc912 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Context.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + /// + /// The IContext Interface defines the communication mechanism for input customization. + /// + /// + /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// + public interface IContext + { + System.Management.Automation.InvocationInfo InvocationInformation { get; set; } + System.Threading.CancellationTokenSource CancellationTokenSource { get; set; } + System.Collections.Generic.IDictionary ExtensibleParameters { get; } + HttpPipeline Pipeline { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Oracle.Oracle Client { get; } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/ConversionException.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/ConversionException.cs new file mode 100644 index 000000000000..9b097e6119e9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/ConversionException.cs @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal class ConversionException : Exception + { + internal ConversionException(string message) + : base(message) { } + + internal ConversionException(JsonNode node, Type targetType) + : base($"Cannot convert '{node.Type}' to a {targetType.Name}") { } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/IJsonConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/IJsonConverter.cs new file mode 100644 index 000000000000..fc5896ed154d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/IJsonConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal interface IJsonConverter + { + JsonNode ToJson(object value); + + object FromJson(JsonNode node); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs new file mode 100644 index 000000000000..bace044631b3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BinaryConverter.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class BinaryConverter : JsonConverter + { + internal override JsonNode ToJson(byte[] value) => new XBinary(value); + + internal override byte[] FromJson(JsonNode node) + { + switch (node.Type) + { + case JsonType.String : return Convert.FromBase64String(node.ToString()); // Base64 Encoded + case JsonType.Binary : return ((XBinary)node).Value; + } + + throw new ConversionException(node, typeof(byte[])); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs new file mode 100644 index 000000000000..a6369b724c7a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/BooleanConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class BooleanConverter : JsonConverter + { + internal override JsonNode ToJson(bool value) => new JsonBoolean(value); + + internal override bool FromJson(JsonNode node) => (bool)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs new file mode 100644 index 000000000000..bdb462625f0f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeConverter.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class DateTimeConverter : JsonConverter + { + internal override JsonNode ToJson(DateTime value) + { + return new JsonDate(value); + } + + internal override DateTime FromJson(JsonNode node) => (DateTime)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs new file mode 100644 index 000000000000..0b2fef2d9769 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class DateTimeOffsetConverter : JsonConverter + { + internal override JsonNode ToJson(DateTimeOffset value) => new JsonDate(value); + + internal override DateTimeOffset FromJson(JsonNode node) => (DateTimeOffset)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs new file mode 100644 index 000000000000..535995227467 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DecimalConverter.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class DecimalConverter : JsonConverter + { + internal override JsonNode ToJson(decimal value) => new JsonNumber(value.ToString()); + + internal override decimal FromJson(JsonNode node) + { + return (decimal)node; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs new file mode 100644 index 000000000000..af85220e0bfc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/DoubleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class DoubleConverter : JsonConverter + { + internal override JsonNode ToJson(double value) => new JsonNumber(value); + + internal override double FromJson(JsonNode node) => (double)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs new file mode 100644 index 000000000000..e59388da5697 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/EnumConverter.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class EnumConverter : IJsonConverter + { + private readonly Type type; + + internal EnumConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + } + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + + public object FromJson(JsonNode node) + { + if (node.Type == JsonType.Number) + { + return Enum.ToObject(type, (int)node); + } + + return Enum.Parse(type, node.ToString(), ignoreCase: true); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs new file mode 100644 index 000000000000..e4fbe1514ccb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/GuidConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class GuidConverter : JsonConverter + { + internal override JsonNode ToJson(Guid value) => new JsonString(value.ToString()); + + internal override Guid FromJson(JsonNode node) => (Guid)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs new file mode 100644 index 000000000000..ab8a71c84a55 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/HashSet'1Converter.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class HashSetConverter : JsonConverter> + { + internal override JsonNode ToJson(HashSet value) + { + return new XSet(value); + } + + internal override HashSet FromJson(JsonNode node) + { + var collection = node as ICollection; + + if (collection.Count == 0) return null; + + // TODO: Remove Linq depedency + return new HashSet(collection.Cast()); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs new file mode 100644 index 000000000000..9e1a41118ca7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class Int16Converter : JsonConverter + { + internal override JsonNode ToJson(short value) => new JsonNumber(value); + + internal override short FromJson(JsonNode node) => (short)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs new file mode 100644 index 000000000000..a6f2ca26bf60 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class Int32Converter : JsonConverter + { + internal override JsonNode ToJson(int value) => new JsonNumber(value); + + internal override int FromJson(JsonNode node) => (int)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs new file mode 100644 index 000000000000..6e9e5653f29b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/Int64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class Int64Converter : JsonConverter + { + internal override JsonNode ToJson(long value) => new JsonNumber(value); + + internal override long FromJson(JsonNode node) => (long)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs new file mode 100644 index 000000000000..172b5750874d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonArrayConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class JsonArrayConverter : JsonConverter + { + internal override JsonNode ToJson(JsonArray value) => value; + + internal override JsonArray FromJson(JsonNode node) => (JsonArray)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs new file mode 100644 index 000000000000..e1ce74260896 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/JsonObjectConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class JsonObjectConverter : JsonConverter + { + internal override JsonNode ToJson(JsonObject value) => value; + + internal override JsonObject FromJson(JsonNode node) => (JsonObject)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs new file mode 100644 index 000000000000..c87e249a2487 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/SingleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class SingleConverter : JsonConverter + { + internal override JsonNode ToJson(float value) => new JsonNumber(value.ToString()); + + internal override float FromJson(JsonNode node) => (float)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs new file mode 100644 index 000000000000..60abd8d24500 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/StringConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class StringConverter : JsonConverter + { + internal override JsonNode ToJson(string value) => new JsonString(value); + + internal override string FromJson(JsonNode node) => node.ToString(); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs new file mode 100644 index 000000000000..1176abba9cf5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/TimeSpanConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class TimeSpanConverter : JsonConverter + { + internal override JsonNode ToJson(TimeSpan value) => new JsonString(value.ToString()); + + internal override TimeSpan FromJson(JsonNode node) => (TimeSpan)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs new file mode 100644 index 000000000000..ddc963315a42 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class UInt16Converter : JsonConverter + { + internal override JsonNode ToJson(ushort value) => new JsonNumber(value); + + internal override ushort FromJson(JsonNode node) => (ushort)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs new file mode 100644 index 000000000000..450d8e0b9eac --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class UInt32Converter : JsonConverter + { + internal override JsonNode ToJson(uint value) => new JsonNumber(value); + + internal override uint FromJson(JsonNode node) => (uint)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs new file mode 100644 index 000000000000..2a1806a23d38 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UInt64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class UInt64Converter : JsonConverter + { + internal override JsonNode ToJson(ulong value) => new JsonNumber(value.ToString()); + + internal override ulong FromJson(JsonNode node) => (ulong)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs new file mode 100644 index 000000000000..b6fbc1adf61b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/Instances/UriConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class UriConverter : JsonConverter + { + internal override JsonNode ToJson(Uri value) => new JsonString(value.AbsoluteUri); + + internal override Uri FromJson(JsonNode node) => (Uri)node; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverter.cs new file mode 100644 index 000000000000..0944dc79cdf0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverter.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public abstract class JsonConverter : IJsonConverter + { + internal abstract T FromJson(JsonNode node); + + internal abstract JsonNode ToJson(T value); + + #region IConverter + + object IJsonConverter.FromJson(JsonNode node) => FromJson(node); + + JsonNode IJsonConverter.ToJson(object value) => ToJson((T)value); + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs new file mode 100644 index 000000000000..16fedc754b53 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterAttribute.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class JsonConverterAttribute : Attribute + { + internal JsonConverterAttribute(Type type) + { + Converter = (IJsonConverter)Activator.CreateInstance(type); + } + + internal IJsonConverter Converter { get; } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs new file mode 100644 index 000000000000..c7b38da7dbdd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/JsonConverterFactory.cs @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class JsonConverterFactory + { + private static readonly Dictionary converters = new Dictionary(); + + static JsonConverterFactory() + { + AddInternal(new BooleanConverter()); + AddInternal(new DateTimeConverter()); + AddInternal(new DateTimeOffsetConverter()); + AddInternal(new BinaryConverter()); + AddInternal(new DecimalConverter()); + AddInternal(new DoubleConverter()); + AddInternal(new GuidConverter()); + AddInternal(new Int16Converter()); + AddInternal(new Int32Converter()); + AddInternal(new Int64Converter()); + AddInternal(new SingleConverter()); + AddInternal(new StringConverter()); + AddInternal(new TimeSpanConverter()); + AddInternal(new UInt16Converter()); + AddInternal(new UInt32Converter()); + AddInternal(new UInt64Converter()); + AddInternal(new UriConverter()); + + // Hash sets + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + + // JSON + + AddInternal(new JsonObjectConverter()); + AddInternal(new JsonArrayConverter()); + } + + internal static Dictionary Instances => converters; + + internal static IJsonConverter Get(Type type) + { + var details = TypeDetails.Get(type); + + if (details.JsonConverter == null) + { + throw new ConversionException($"No converter found for '{type.Name}'."); + } + + return details.JsonConverter; + } + + internal static bool TryGet(Type type, out IJsonConverter converter) + { + var typeDetails = TypeDetails.Get(type); + + converter = typeDetails.JsonConverter; + + return converter != null; + } + + private static void AddInternal(JsonConverter converter) + => converters.Add(typeof(T), converter); + + private static void AddInternal(IJsonConverter converter) + => converters.Add(typeof(T), converter); + + internal static void Add(JsonConverter converter) + { + if (converter == null) + { + throw new ArgumentNullException(nameof(converter)); + } + + AddInternal(converter); + + var type = TypeDetails.Get(); + + type.JsonConverter = converter; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/StringLikeConverter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/StringLikeConverter.cs new file mode 100644 index 000000000000..26d44fd51a9b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Conversions/StringLikeConverter.cs @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class StringLikeConverter : IJsonConverter + { + private readonly Type type; + private readonly MethodInfo parseMethod; + + internal StringLikeConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + this.parseMethod = StringLikeHelper.GetParseMethod(type); + } + + public object FromJson(JsonNode node) => + parseMethod.Invoke(null, new[] { node.ToString() }); + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + } + + internal static class StringLikeHelper + { + private static readonly Type[] parseMethodParamaterTypes = new[] { typeof(string) }; + + internal static bool IsStringLike(Type type) + { + return GetParseMethod(type) != null; + } + + internal static MethodInfo GetParseMethod(Type type) + { + MethodInfo method = type.GetMethod("Parse", parseMethodParamaterTypes); + + if (method?.IsPublic != true) return null; + + return method; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/IJsonSerializable.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/IJsonSerializable.cs new file mode 100644 index 000000000000..78110776ffb7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/IJsonSerializable.cs @@ -0,0 +1,263 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + public interface IJsonSerializable + { + JsonNode ToJson(JsonObject container = null, SerializationMode serializationMode = SerializationMode.None); + } + internal static class JsonSerializable + { + /// + /// Serializes an enumerable and returns a JsonNode. + /// + /// an IEnumerable collection of items + /// A JsonNode that contains the collection of items serialized. + private static JsonNode ToJsonValue(System.Collections.IEnumerable enumerable) + { + if (enumerable != null) + { + // is it a byte array of some kind? + if (enumerable is System.Collections.Generic.IEnumerable byteEnumerable) + { + return new XBinary(System.Linq.Enumerable.ToArray(byteEnumerable)); + } + + var hasValues = false; + // just create an array of value nodes. + var result = new XNodeArray(); + foreach (var each in enumerable) + { + // we had at least one value. + hasValues = true; + + // try to serialize it. + var node = ToJsonValue(each); + if (null != node) + { + result.Add(node); + } + } + + // if we were able to add values, (or it was just empty), return it. + if (result.Count > 0 || !hasValues) + { + return result; + } + } + + // we couldn't serialize the values. Sorry. + return null; + } + + /// + /// Serializes a valuetype to a JsonNode. + /// + /// a ValueType (ie, a primitive, enum or struct) to be serialized + /// a JsonNode with the serialized value + private static JsonNode ToJsonValue(ValueType vValue) + { + // numeric type + if (vValue is SByte || vValue is Int16 || vValue is Int32 || vValue is Int64 || vValue is Byte || vValue is UInt16 || vValue is UInt32 || vValue is UInt64 || vValue is decimal || vValue is float || vValue is double) + { + return new JsonNumber(vValue.ToString()); + } + + // boolean type + if (vValue is bool bValue) + { + return new JsonBoolean(bValue); + } + + // dates + if (vValue is DateTime dtValue) + { + return new JsonDate(dtValue); + } + + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + + // sorry, no idea. + return null; + } + /// + /// Attempts to serialize an object by using ToJson() or ToJsonString() if they exist. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + private static JsonNode TryToJsonValue(dynamic oValue) + { + object jsonValue = null; + dynamic v = oValue; + try + { + jsonValue = v.ToJson().ToString(); + } + catch + { + // no harm... + try + { + jsonValue = v.ToJsonString().ToString(); + } + catch + { + // no worries here either. + } + } + + // if we got something out, let's use it. + if (null != jsonValue) + { + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + return new JsonNumber(jsonValue.ToString()); + } + + return null; + } + + /// + /// Serialize an object by using a variety of methods. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + internal static JsonNode ToJsonValue(object value) + { + // things that implement our interface are preferred. + if (value is Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IJsonSerializable jsonSerializable) + { + return jsonSerializable.ToJson(); + } + + // strings are easy. + if (value is string || value is char) + { + return new JsonString(value.ToString()); + } + + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + if (value is System.ValueType vValue) + { + return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); + } + + // dictionaries are objects that should be able to serialize + if (value is System.Collections.Generic.IDictionary dictionary) + { + return Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.ToJson(dictionary, null); + } + + // hashtables are converted to dictionaries for serialization + if (value is System.Collections.Hashtable hashtable) + { + var dict = new System.Collections.Generic.Dictionary(); + DictionaryExtensions.HashTableToDictionary(hashtable, dict); + return Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.ToJson(dict, null); + } + + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + if (value is System.Collections.IEnumerable enumerableValue) + { + // some kind of enumerable value + return ToJsonValue(enumerableValue) ?? TryToJsonValue(value) ?? new JsonString(value.ToString()); + } + + // at this point, we're going to fallback to a string literal here, since we really have no idea what it is. + return new JsonString(value.ToString()); + } + + internal static JsonObject ToJson(System.Collections.Generic.Dictionary dictionary, JsonObject container) => ToJson((System.Collections.Generic.IDictionary)dictionary, container); + + /// + /// Serializes a dictionary into a JsonObject container. + /// + /// The dictionary to serailize + /// the container to serialize the dictionary into + /// the container + internal static JsonObject ToJson(System.Collections.Generic.IDictionary dictionary, JsonObject container) + { + container = container ?? new JsonObject(); + if (dictionary != null && dictionary.Count > 0) + { + foreach (var key in dictionary) + { + // currently, we don't serialize null values. + if (null != key.Value) + { + container.Add(key.Key, ToJsonValue(key.Value)); + continue; + } + } + } + return container; + } + + internal static Func> DeserializeDictionary(Func> dictionaryFactory) + { + return (node) => FromJson(node, dictionaryFactory(), (object)(DeserializeDictionary(dictionaryFactory)) as Func); + } + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.Dictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) => FromJson(json, (System.Collections.Generic.IDictionary)container, objectFactory, excludes); + + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.IDictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) + { + if (null == json) + { + return container; + } + + foreach (var key in json.Keys) + { + if (true == excludes?.Contains(key)) + { + continue; + } + + var value = json[key]; + try + { + switch (value.Type) + { + case JsonType.Null: + // skip null values. + continue; + + case JsonType.Array: + case JsonType.Boolean: + case JsonType.Date: + case JsonType.Binary: + case JsonType.Number: + case JsonType.String: + container.Add(key, (V)value.ToValue()); + break; + case JsonType.Object: + if (objectFactory != null) + { + var v = objectFactory(value as JsonObject); + if (null != v) + { + container.Add(key, v); + } + } + break; + } + } + catch + { + } + } + return container; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonArray.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonArray.cs new file mode 100644 index 000000000000..02b16578c48f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonArray.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public partial class JsonArray + { + internal override object ToValue() => Count == 0 ? new object[0] : System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(this, each => each.ToValue())); + } + + +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonBoolean.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonBoolean.cs new file mode 100644 index 000000000000..9f8d166e31f5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonBoolean.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal partial class JsonBoolean + { + internal static JsonBoolean Create(bool? value) => value is bool b ? new JsonBoolean(b) : null; + internal bool ToBoolean() => Value; + + internal override object ToValue() => Value; + } + + +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNode.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNode.cs new file mode 100644 index 000000000000..50516342e688 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNode.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonNode + { + /// + /// Returns the content of this node as the underlying value. + /// Will default to the string representation if not overridden in child classes. + /// + /// an object with the underlying value of the node. + internal virtual object ToValue() { + return this.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNumber.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNumber.cs new file mode 100644 index 000000000000..5a46d21aa483 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonNumber.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + using System; + + public partial class JsonNumber + { + internal static readonly DateTime EpochDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static long ToUnixTime(DateTime dateTime) + { + return (long)dateTime.Subtract(EpochDate).TotalSeconds; + } + private static DateTime FromUnixTime(long totalSeconds) + { + return EpochDate.AddSeconds(totalSeconds); + } + internal byte ToByte() => this; + internal int ToInt() => this; + internal long ToLong() => this; + internal short ToShort() => this; + internal UInt16 ToUInt16() => this; + internal UInt32 ToUInt32() => this; + internal UInt64 ToUInt64() => this; + internal decimal ToDecimal() => this; + internal double ToDouble() => this; + internal float ToFloat() => this; + + internal static JsonNumber Create(int? value) => value is int n ? new JsonNumber(n) : null; + internal static JsonNumber Create(long? value) => value is long n ? new JsonNumber(n) : null; + internal static JsonNumber Create(float? value) => value is float n ? new JsonNumber(n) : null; + internal static JsonNumber Create(double? value) => value is double n ? new JsonNumber(n) : null; + internal static JsonNumber Create(decimal? value) => value is decimal n ? new JsonNumber(n) : null; + internal static JsonNumber Create(DateTime? value) => value is DateTime date ? new JsonNumber(ToUnixTime(date)) : null; + + public static implicit operator DateTime(JsonNumber number) => FromUnixTime(number); + internal DateTime ToDateTime() => this; + + internal JsonNumber(decimal value) + { + this.value = value.ToString(); + } + internal override object ToValue() + { + if (IsInteger) + { + if (int.TryParse(this.value, out int iValue)) + { + return iValue; + } + if (long.TryParse(this.value, out long lValue)) + { + return lValue; + } + } + else + { + if (float.TryParse(this.value, out float fValue)) + { + return fValue; + } + if (double.TryParse(this.value, out double dValue)) + { + return dValue; + } + if (decimal.TryParse(this.value, out decimal dcValue)) + { + return dcValue; + } + } + return null; + } + } + + +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonObject.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonObject.cs new file mode 100644 index 000000000000..2a20d5aab492 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonObject.cs @@ -0,0 +1,183 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonObject + { + internal override object ToValue() => Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.JsonSerializable.FromJson(this, new System.Collections.Generic.Dictionary(), (obj) => obj.ToValue()); + + internal void SafeAdd(string name, Func valueFn) + { + if (valueFn != null) + { + var value = valueFn(); + if (null != value) + { + items.Add(name, value); + } + } + } + + internal void SafeAdd(string name, JsonNode value) + { + if (null != value) + { + items.Add(name, value); + } + } + + internal T NullableProperty(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; + } + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + //throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal JsonObject Property(string propertyName) + { + return PropertyT(propertyName); + } + + internal T PropertyT(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; // we're going to assume that the consumer knows what to do if null is explicity returned? + } + + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + // throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal int NumberProperty(string propertyName, ref int output) => output = this.PropertyT(propertyName)?.ToInt() ?? output; + internal float NumberProperty(string propertyName, ref float output) => output = this.PropertyT(propertyName)?.ToFloat() ?? output; + internal byte NumberProperty(string propertyName, ref byte output) => output = this.PropertyT(propertyName)?.ToByte() ?? output; + internal long NumberProperty(string propertyName, ref long output) => output = this.PropertyT(propertyName)?.ToLong() ?? output; + internal double NumberProperty(string propertyName, ref double output) => output = this.PropertyT(propertyName)?.ToDouble() ?? output; + internal decimal NumberProperty(string propertyName, ref decimal output) => output = this.PropertyT(propertyName)?.ToDecimal() ?? output; + internal short NumberProperty(string propertyName, ref short output) => output = this.PropertyT(propertyName)?.ToShort() ?? output; + internal DateTime NumberProperty(string propertyName, ref DateTime output) => output = this.PropertyT(propertyName)?.ToDateTime() ?? output; + + internal int? NumberProperty(string propertyName, ref int? output) => output = this.NullableProperty(propertyName)?.ToInt() ?? null; + internal float? NumberProperty(string propertyName, ref float? output) => output = this.NullableProperty(propertyName)?.ToFloat() ?? null; + internal byte? NumberProperty(string propertyName, ref byte? output) => output = this.NullableProperty(propertyName)?.ToByte() ?? null; + internal long? NumberProperty(string propertyName, ref long? output) => output = this.NullableProperty(propertyName)?.ToLong() ?? null; + internal double? NumberProperty(string propertyName, ref double? output) => output = this.NullableProperty(propertyName)?.ToDouble() ?? null; + internal decimal? NumberProperty(string propertyName, ref decimal? output) => output = this.NullableProperty(propertyName)?.ToDecimal() ?? null; + internal short? NumberProperty(string propertyName, ref short? output) => output = this.NullableProperty(propertyName)?.ToShort() ?? null; + + internal DateTime? NumberProperty(string propertyName, ref DateTime? output) => output = this.NullableProperty(propertyName)?.ToDateTime() ?? null; + + + internal string StringProperty(string propertyName) => this.PropertyT(propertyName)?.ToString(); + internal string StringProperty(string propertyName, ref string output) => output = this.PropertyT(propertyName)?.ToString() ?? output; + internal char StringProperty(string propertyName, ref char output) => output = this.PropertyT(propertyName)?.ToChar() ?? output; + internal char? StringProperty(string propertyName, ref char? output) => output = this.PropertyT(propertyName)?.ToChar() ?? null; + + internal DateTime StringProperty(string propertyName, ref DateTime output) => DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out output) ? output : output; + internal DateTime? StringProperty(string propertyName, ref DateTime? output) => output = DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out var o) ? o : output; + + + internal bool BooleanProperty(string propertyName, ref bool output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? output; + internal bool? BooleanProperty(string propertyName, ref bool? output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? null; + + internal T[] ArrayProperty(string propertyName, ref T[] output, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + } + return output; + } + internal T[] ArrayProperty(string propertyName, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + var output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + return output; + } + return new T[0]; + } + internal void IterateArrayProperty(string propertyName, Action deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + for (var i = 0; i < array.Count; i++) + { + deserializer(array[i]); + } + } + } + + internal Dictionary DictionaryProperty(string propertyName, ref Dictionary output, Func deserializer) + { + var dictionary = this.PropertyT(propertyName); + if (output == null) + { + output = new Dictionary(); + } + else + { + output.Clear(); + } + if (dictionary != null) + { + foreach (var key in dictionary.Keys) + { + output[key] = deserializer(dictionary[key]); + } + } + return output; + } + + internal static JsonObject Create(IDictionary source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new JsonObject(); + + foreach (var key in source.Keys) + { + result.SafeAdd(key, selector(source[key])); + } + return result; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonString.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonString.cs new file mode 100644 index 000000000000..383f95300a13 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/JsonString.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + using System; + using System.Globalization; + using System.Linq; + + public partial class JsonString + { + internal static string DateFormat = "yyyy-MM-dd"; + internal static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + internal static string DateTimeRfc1123Format = "R"; + + internal static JsonString Create(string value) => value == null ? null : new JsonString(value); + internal static JsonString Create(char? value) => value is char c ? new JsonString(c.ToString()) : null; + + internal static JsonString CreateDate(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTime(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTimeRfc1123(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeRfc1123Format, CultureInfo.CurrentCulture)) : null; + + internal char ToChar() => this.Value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char(JsonString value) => value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char? (JsonString value) => value?.ToString()?.FirstOrDefault(); + + public static implicit operator DateTime(JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime); + public static implicit operator DateTime? (JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime?); + + } + + +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/XNodeArray.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/XNodeArray.cs new file mode 100644 index 000000000000..96f19944d3cb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Customizations/XNodeArray.cs @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + using System; + using System.Linq; + + public partial class XNodeArray + { + internal static XNodeArray Create(T[] source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new XNodeArray(); + foreach (var item in source.Select(selector)) + { + result.SafeAdd(item); + } + return result; + } + internal void SafeAdd(JsonNode item) + { + if (item != null) + { + items.Add(item); + } + } + internal void SafeAdd(Func itemFn) + { + if (itemFn != null) + { + var item = itemFn(); + if (item != null) + { + items.Add(item); + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Debugging.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Debugging.cs new file mode 100644 index 000000000000..9dfda2e63091 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Debugging.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + internal static class AttachDebugger + { + internal static void Break() + { + while (!System.Diagnostics.Debugger.IsAttached) + { + System.Console.Error.WriteLine($"Waiting for debugger to attach to process {System.Diagnostics.Process.GetCurrentProcess().Id}"); + for (int i = 0; i < 50; i++) + { + if (System.Diagnostics.Debugger.IsAttached) + { + break; + } + System.Threading.Thread.Sleep(100); + System.Console.Error.Write("."); + } + System.Console.Error.WriteLine(); + } + System.Diagnostics.Debugger.Break(); + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/DictionaryExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/DictionaryExtensions.cs new file mode 100644 index 000000000000..d2c166049843 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/DictionaryExtensions.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + internal static class DictionaryExtensions + { + internal static void HashTableToDictionary(System.Collections.Hashtable hashtable, System.Collections.Generic.IDictionary dictionary) + { + if (null == hashtable) + { + return; + } + foreach (var each in hashtable.Keys) + { + var key = each.ToString(); + var value = hashtable[key]; + if (null != value) + { + try + { + dictionary[key] = (V)value; + } + catch + { + // Values getting dropped; not compatible with target dictionary. Not sure what to do here. + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/EventData.cs b/src/Oracle/Oracle.Autorest/generated/runtime/EventData.cs new file mode 100644 index 000000000000..88dc91eafa1f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/EventData.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + + using System; + using System.Threading; + + ///Represents the data in signaled event. + public partial class EventData + { + /// + /// The type of the event being signaled + /// + public string Id; + + /// + /// The user-ready message from the event. + /// + public string Message; + + /// + /// When the event is about a parameter, this is the parameter name. + /// Used in Validation Events + /// + public string Parameter; + + /// + /// This represents a numeric value associated with the event. + /// Use for progress-style events + /// + public double Value; + + /// + /// Any extended data for an event should be serialized and stored here. + /// + public string ExtendedData; + + /// + /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) + /// { + /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); + /// } + /// + /// + public object RequestMessage; + + /// + /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ + /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); + /// } + /// + /// + public object ResponseMessage; + + /// + /// Cancellation method for this event. + /// + /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() + /// + /// + /// The original initiator of the request must provide the implementation of this. + /// + public System.Action Cancel; + } + +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/EventDataExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/EventDataExtensions.cs new file mode 100644 index 000000000000..6c2fc5969954 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/EventDataExtensions.cs @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System; + + /// + /// PowerShell-specific data on top of the llc# EventData + /// + /// + /// In PowerShell, we add on the EventDataConverter to support sending events between modules. + /// Obviously, this code would need to be duplcated on both modules. + /// This is preferable to sharing a common library, as versioning makes that problematic. + /// + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] + public partial class EventData : EventArgs + { + } + + /// + /// A PowerShell PSTypeConverter to adapt an EventData object that has been passed. + /// Usually used between modules. + /// + public class EventDataConverter : System.Management.Automation.PSTypeConverter + { + public override bool CanConvertTo(object sourceValue, Type destinationType) => false; + public override object ConvertTo(object sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => null; + public override bool CanConvertFrom(dynamic sourceValue, Type destinationType) => destinationType == typeof(EventData) && CanConvertFrom(sourceValue); + public override object ConvertFrom(dynamic sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Verifies that a given object has the required members to convert it to the target type (EventData) + /// + /// Uses a dynamic type so that it is able to use the simplest code without excessive checking. + /// + /// The instance to verify + /// True, if the object has all the required parameters. + public static bool CanConvertFrom(dynamic sourceValue) + { + try + { + // check if this has *required* parameters... + sourceValue?.Id?.GetType(); + sourceValue?.Message?.GetType(); + sourceValue?.Cancel?.GetType(); + + // remaining parameters are not *required*, + // and if they have values, it will copy them at conversion time. + } + catch + { + // if anything throws an exception (because it's null, or doesn't have that member) + return false; + } + return true; + } + + /// + /// Returns result of the delegate as the expected type, or default(T) + /// + /// This isolates any exceptions from the consumer. + /// + /// A delegate that returns a value + /// The desired output type + /// The value from the function if the type is correct + private static T To(Func srcValue) + { + try { return srcValue(); } + catch { return default(T); } + } + + /// + /// Converts an incoming object to the expected type by treating the incoming object as a dynamic, and coping the expected values. + /// + /// the incoming object + /// EventData + public static EventData ConvertFrom(dynamic sourceValue) + { + return new EventData + { + Id = To(() => sourceValue.Id), + Message = To(() => sourceValue.Message), + Parameter = To(() => sourceValue.Parameter), + Value = To(() => sourceValue.Value), + RequestMessage = To(() => sourceValue.RequestMessage), + ResponseMessage = To(() => sourceValue.ResponseMessage), + Cancel = To(() => sourceValue.Cancel) + }; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/EventListener.cs b/src/Oracle/Oracle.Autorest/generated/runtime/EventListener.cs new file mode 100644 index 000000000000..205fada9bcf7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/EventListener.cs @@ -0,0 +1,247 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public interface IValidates + { + Task Validate(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IEventListener listener); + } + + /// + /// The IEventListener Interface defines the communication mechanism for Signaling events during a remote call. + /// + /// + /// The interface is designed to be as minimal as possible, allow for quick peeking of the event type (id) + /// and the cancellation status and provides a delegate for retrieving the event details themselves. + /// + public interface IEventListener + { + Task Signal(string id, CancellationToken token, GetEventData createMessage); + CancellationToken Token { get; } + System.Action Cancel { get; } + } + + internal static partial class Extensions + { + public static Task Signal(this IEventListener instance, string id, CancellationToken token, Func createMessage) => instance.Signal(id, token, createMessage); + public static Task Signal(this IEventListener instance, string id, CancellationToken token) => instance.Signal(id, token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, EventData message) => instance.Signal(id, token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, Func createMessage) => instance.Signal(id, instance.Token, createMessage); + public static Task Signal(this IEventListener instance, string id) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, EventData message) => instance.Signal(id, instance.Token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, System.Uri uri) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = uri.ToString(), Cancel = instance.Cancel }); + + public static async Task AssertNotNull(this IEventListener instance, string parameterName, object value) + { + if (value == null) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' should not be null", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMinimumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length < length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is less than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMaximumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length > length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is greater than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + + public static async Task AssertRegEx(this IEventListener instance, string parameterName, string value, string regularExpression) + { + if (value != null && !System.Text.RegularExpressions.Regex.Match(value, regularExpression).Success) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' does not validate against pattern /{regularExpression}/", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertEnum(this IEventListener instance, string parameterName, string value, params string[] values) + { + if (!values.Any(each => each.Equals(value))) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' is not one of ({values.Aggregate((c, e) => $"'{e}',{c}")}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertObjectIsValid(this IEventListener instance, string parameterName, object inst) + { + await (inst as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IValidates)?.Validate(instance); + } + + public static async Task AssertIsLessThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) >= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) <= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsLessThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) > 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) < 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64? value, Int64 multiple) + { + if (null != value && value % multiple != 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, double? value, double multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, decimal? value, decimal multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + } + + /// + /// An Implementation of the IEventListener that supports subscribing to events and dispatching them + /// (used for manually using the lowlevel interface) + /// + public class EventListener : CancellationTokenSource, IEnumerable>, IEventListener + { + private Dictionary calls = new Dictionary(); + public IEnumerator> GetEnumerator() => calls.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => calls.GetEnumerator(); + public EventListener() + { + } + + public new Action Cancel => base.Cancel; + private Event tracer; + + public EventListener(params (string name, Event callback)[] initializer) + { + foreach (var each in initializer) + { + Add(each.name, each.callback); + } + } + + public void Add(string name, SynchEvent callback) + { + Add(name, (message) => { callback(message); return Task.CompletedTask; }); + } + + public void Add(string name, Event callback) + { + if (callback != null) + { + if (string.IsNullOrEmpty(name)) + { + if (calls.ContainsKey(name)) + { + tracer += callback; + } + else + { + tracer = callback; + } + } + else + { + if (calls.ContainsKey(name)) + { + calls[name ?? System.String.Empty] += callback; + } + else + { + calls[name ?? System.String.Empty] = callback; + } + } + } + } + + + public async Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + using (NoSynchronizationContext) + { + if (!string.IsNullOrEmpty(id) && (calls.TryGetValue(id, out Event listener) || tracer != null)) + { + var message = createMessage(); + message.Id = id; + + await listener?.Invoke(message); + await tracer?.Invoke(message); + + if (token.IsCancellationRequested) + { + throw new OperationCanceledException($"Canceled by event {id} ", this.Token); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Events.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Events.cs new file mode 100644 index 000000000000..8e2c1090ae96 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Events.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + public static partial class Events + { + public const string Log = nameof(Log); + public const string Validation = nameof(Validation); + public const string ValidationWarning = nameof(ValidationWarning); + public const string AfterValidation = nameof(AfterValidation); + public const string RequestCreated = nameof(RequestCreated); + public const string ResponseCreated = nameof(ResponseCreated); + public const string URLCreated = nameof(URLCreated); + public const string Finally = nameof(Finally); + public const string HeaderParametersAdded = nameof(HeaderParametersAdded); + public const string BodyContentSet = nameof(BodyContentSet); + public const string BeforeCall = nameof(BeforeCall); + public const string BeforeResponseDispatch = nameof(BeforeResponseDispatch); + public const string FollowingNextLink = nameof(FollowingNextLink); + public const string DelayBeforePolling = nameof(DelayBeforePolling); + public const string Polling = nameof(Polling); + public const string Progress = nameof(Progress); + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/EventsExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/EventsExtensions.cs new file mode 100644 index 000000000000..84d29b74f865 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/EventsExtensions.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + public static partial class Events + { + public const string CmdletProcessRecordStart = nameof(CmdletProcessRecordStart); + public const string CmdletProcessRecordAsyncStart = nameof(CmdletProcessRecordAsyncStart); + public const string CmdletException = nameof(CmdletException); + public const string CmdletGetPipeline = nameof(CmdletGetPipeline); + public const string CmdletBeforeAPICall = nameof(CmdletBeforeAPICall); + public const string CmdletBeginProcessing = nameof(CmdletBeginProcessing); + public const string CmdletEndProcessing = nameof(CmdletEndProcessing); + public const string CmdletProcessRecordEnd = nameof(CmdletProcessRecordEnd); + public const string CmdletProcessRecordAsyncEnd = nameof(CmdletProcessRecordAsyncEnd); + public const string CmdletAfterAPICall = nameof(CmdletAfterAPICall); + + public const string Verbose = nameof(Verbose); + public const string Debug = nameof(Debug); + public const string Information = nameof(Information); + public const string Error = nameof(Error); + public const string Warning = nameof(Warning); + } + +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Extensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Extensions.cs new file mode 100644 index 000000000000..31d4017e88b8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Extensions.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System.Linq; + using System; + + internal static partial class Extensions + { + public static T[] SubArray(this T[] array, int offset, int length) + { + return new ArraySegment(array, offset, length) + .ToArray(); + } + + public static T ReadHeaders(this T instance, global::System.Net.Http.Headers.HttpResponseHeaders headers) where T : class + { + (instance as IHeaderSerializable)?.ReadHeaders(headers); + return instance; + } + + internal static bool If(T input, out T output) + { + if (null == input) + { + output = default(T); + return false; + } + output = input; + return true; + } + + internal static void AddIf(T value, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(value); + } + } + + internal static void AddIf(T value, string serializedName, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(serializedName, value); + } + } + + /// + /// Returns the first header value as a string from an HttpReponseMessage. + /// + /// the HttpResponseMessage to fetch a header from + /// the header name + /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; + + /// + /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, + /// will restore the synchonization context to the original value. + /// + /// This is used a less-invasive means to ensure that code in the library that doesn't + /// need to be continued in the original context doesn't have to have ConfigureAwait(false) + /// on every single await + /// + /// If the SynchronizationContext is null when this is used, the resulting IDisposable + /// will not do anything (this prevents excessive re-setting of the SynchronizationContext) + /// + /// Usage: + /// + /// using(NoSynchronizationContext) { + /// await SomeAsyncOperation(); + /// await SomeOtherOperation(); + /// } + /// + /// + /// + /// An IDisposable that will return the SynchronizationContext to original state + internal static System.IDisposable NoSynchronizationContext => System.Threading.SynchronizationContext.Current == null ? Dummy : new NoSyncContext(); + + /// + /// An instance of the Dummy IDispoable. + /// + /// + internal static System.IDisposable Dummy = new DummyDisposable(); + + /// + /// An IDisposable that does absolutely nothing. + /// + internal class DummyDisposable : System.IDisposable + { + public void Dispose() + { + } + } + /// + /// An IDisposable that saves the SynchronizationContext,sets it to null and + /// restores it to the original upon Dispose(). + /// + /// NOTE: This is designed to be less invasive than using .ConfigureAwait(false) + /// on every single await in library code (ie, places where we know we don't need + /// to continue in the same context as we went async) + /// + internal class NoSyncContext : System.IDisposable + { + private System.Threading.SynchronizationContext original = System.Threading.SynchronizationContext.Current; + internal NoSyncContext() + { + System.Threading.SynchronizationContext.SetSynchronizationContext(null); + } + public void Dispose() => System.Threading.SynchronizationContext.SetSynchronizationContext(original); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs new file mode 100644 index 000000000000..92a42722de2d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal static class StringBuilderExtensions + { + /// + /// Extracts the buffered value and resets the buffer + /// + internal static string Extract(this StringBuilder builder) + { + var text = builder.ToString(); + + builder.Clear(); + + return text; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs new file mode 100644 index 000000000000..8c0d8b197cc8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Extensions/TypeExtensions.cs @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal static class TypeExtensions + { + internal static bool IsNullable(this Type type) => + type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)); + + internal static Type GetOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition() == openGenericInterfaceType) + { + return candidateType; + } + + // Check if it references it's own converter.... + + foreach (Type interfaceType in candidateType.GetInterfaces()) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return interfaceType; + } + } + + return null; + } + + // Author: Sebastian Good + // http://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type + internal static bool ImplementsOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + if (candidateType.Equals(openGenericInterfaceType)) + { + return true; + } + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return true; + } + + foreach (Type i in candidateType.GetInterfaces()) + { + if (i.IsGenericType && i.ImplementsOpenGenericInterface(openGenericInterfaceType)) + { + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Seperator.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Seperator.cs new file mode 100644 index 000000000000..61fddb786523 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/Seperator.cs @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal static class Seperator + { + internal static readonly char[] Dash = { '-' }; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/TypeDetails.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/TypeDetails.cs new file mode 100644 index 000000000000..70070825bd5b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/TypeDetails.cs @@ -0,0 +1,116 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + + + + internal class TypeDetails + { + private readonly Type info; + + internal TypeDetails(Type info) + { + this.info = info ?? throw new ArgumentNullException(nameof(info)); + } + + internal Type NonNullType { get; set; } + + internal object DefaultValue { get; set; } + + internal bool IsNullable { get; set; } + + internal bool IsList { get; set; } + + internal bool IsStringLike { get; set; } + + internal bool IsEnum => info.IsEnum; + + internal bool IsArray => info.IsArray; + + internal bool IsValueType => info.IsValueType; + + internal Type ElementType { get; set; } + + internal IJsonConverter JsonConverter { get; set; } + + #region Creation + + private static readonly ConcurrentDictionary cache = new ConcurrentDictionary(); + + internal static TypeDetails Get() => Get(typeof(T)); + + internal static TypeDetails Get(Type type) => cache.GetOrAdd(type, Create); + + private static TypeDetails Create(Type type) + { + var isGenericList = !type.IsPrimitive && type.ImplementsOpenGenericInterface(typeof(IList<>)); + var isList = !type.IsPrimitive && (isGenericList || typeof(IList).IsAssignableFrom(type)); + + var isNullable = type.IsNullable(); + + Type elementType; + + if (type.IsArray) + { + elementType = type.GetElementType(); + } + else if (isGenericList) + { + var iList = type.GetOpenGenericInterface(typeof(IList<>)); + + elementType = iList.GetGenericArguments()[0]; + } + else + { + elementType = null; + } + + var nonNullType = isNullable ? type.GetGenericArguments()[0] : type; + + var isStringLike = false; + + IJsonConverter converter; + + var jsonConverterAttribute = type.GetCustomAttribute(); + + if (jsonConverterAttribute != null) + { + converter = jsonConverterAttribute.Converter; + } + else if (nonNullType.IsEnum) + { + converter = new EnumConverter(nonNullType); + } + else if (JsonConverterFactory.Instances.TryGetValue(nonNullType, out converter)) + { + } + else if (StringLikeHelper.IsStringLike(nonNullType)) + { + isStringLike = true; + + converter = new StringLikeConverter(nonNullType); + } + + return new TypeDetails(nonNullType) { + NonNullType = nonNullType, + DefaultValue = type.IsValueType ? Activator.CreateInstance(type) : null, + IsNullable = isNullable, + IsList = isList, + IsStringLike = isStringLike, + ElementType = elementType, + JsonConverter = converter + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/XHelper.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/XHelper.cs new file mode 100644 index 000000000000..091c65e2cf5d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Helpers/XHelper.cs @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal static class XHelper + { + internal static JsonNode Create(JsonType type, TypeCode code, object value) + { + switch (type) + { + case JsonType.Binary : return new XBinary((byte[])value); + case JsonType.Boolean : return new JsonBoolean((bool)value); + case JsonType.Number : return new JsonNumber(value.ToString()); + case JsonType.String : return new JsonString((string)value); + } + + throw new Exception($"JsonType '{type}' does not have a fast conversion"); + } + + internal static bool TryGetElementType(TypeCode code, out JsonType type) + { + switch (code) + { + case TypeCode.Boolean : type = JsonType.Boolean; return true; + case TypeCode.Byte : type = JsonType.Number; return true; + case TypeCode.DateTime : type = JsonType.Date; return true; + case TypeCode.Decimal : type = JsonType.Number; return true; + case TypeCode.Double : type = JsonType.Number; return true; + case TypeCode.Empty : type = JsonType.Null; return true; + case TypeCode.Int16 : type = JsonType.Number; return true; + case TypeCode.Int32 : type = JsonType.Number; return true; + case TypeCode.Int64 : type = JsonType.Number; return true; + case TypeCode.SByte : type = JsonType.Number; return true; + case TypeCode.Single : type = JsonType.Number; return true; + case TypeCode.String : type = JsonType.String; return true; + case TypeCode.UInt16 : type = JsonType.Number; return true; + case TypeCode.UInt32 : type = JsonType.Number; return true; + case TypeCode.UInt64 : type = JsonType.Number; return true; + } + + type = default; + + return false; + } + + internal static JsonType GetElementType(TypeCode code) + { + switch (code) + { + case TypeCode.Boolean : return JsonType.Boolean; + case TypeCode.Byte : return JsonType.Number; + case TypeCode.DateTime : return JsonType.Date; + case TypeCode.Decimal : return JsonType.Number; + case TypeCode.Double : return JsonType.Number; + case TypeCode.Empty : return JsonType.Null; + case TypeCode.Int16 : return JsonType.Number; + case TypeCode.Int32 : return JsonType.Number; + case TypeCode.Int64 : return JsonType.Number; + case TypeCode.SByte : return JsonType.Number; + case TypeCode.Single : return JsonType.Number; + case TypeCode.String : return JsonType.String; + case TypeCode.UInt16 : return JsonType.Number; + case TypeCode.UInt32 : return JsonType.Number; + case TypeCode.UInt64 : return JsonType.Number; + default : return JsonType.Object; + } + + throw new Exception($"TypeCode '{code}' does not have a fast converter"); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/HttpPipeline.cs b/src/Oracle/Oracle.Autorest/generated/runtime/HttpPipeline.cs new file mode 100644 index 000000000000..073ef72c065f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/HttpPipeline.cs @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + using GetEventData = System.Func; + using NextDelegate = System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + + using SignalDelegate = System.Func, System.Threading.Tasks.Task>; + using GetParameterDelegate = System.Func, string, object>; + using SendAsyncStepDelegate = System.Func, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + using PipelineChangeDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>; + using ModuleLoadPipelineDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + using NewRequestPipelineDelegate = System.Action, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + +/* + public class DelegateBasedEventListener : IEventListener + { + private EventListenerDelegate _listener; + public DelegateBasedEventListener(EventListenerDelegate listener) + { + _listener = listener; + } + public CancellationToken Token => CancellationToken.None; + public System.Action Cancel => () => { }; + + + public Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + return _listener(id, token, () => createMessage()); + } + } +*/ + /// + /// This is a necessary extension to the SendAsyncFactory to support the 'generic' delegate format. + /// + public partial class SendAsyncFactory + { + /// + /// This translates a generic-defined delegate for a listener into one that fits our ISendAsync pattern. + /// (Provided to support out-of-module delegation for Azure Cmdlets) + /// + /// The Pipeline Step as a delegate + public SendAsyncFactory(SendAsyncStepDelegate step) => this.implementation = (request, listener, next) => + step( + request, + listener.Token, + listener.Cancel, + (id, token, getEventData) => listener.Signal(id, token, () => { + var data = EventDataConverter.ConvertFrom( getEventData() ) as EventData; + data.Id = id; + data.Cancel = listener.Cancel; + data.RequestMessage = request; + return data; + }), + (req, token, cancel, listenerDelegate) => next.SendAsync(req, listener)); + } + + public partial class HttpPipeline : ISendAsync + { + public HttpPipeline Append(SendAsyncStepDelegate item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStepDelegate item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/HttpPipelineMocking.ps1 b/src/Oracle/Oracle.Autorest/generated/runtime/HttpPipelineMocking.ps1 new file mode 100644 index 000000000000..47fd3d207601 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/HttpPipelineMocking.ps1 @@ -0,0 +1,110 @@ +$ErrorActionPreference = "Stop" + +# get the recording path +if (-not $TestRecordingFile) { + $TestRecordingFile = Join-Path $PSScriptRoot 'recording.json' +} + +# create the Http Pipeline Recorder +$Mock = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PipelineMock $TestRecordingFile + +# set the recorder to the appropriate mode (default to 'live') +Write-Host -ForegroundColor Green "Running '$TestMode' mode..." +switch ($TestMode) { + 'record' { + Write-Host -ForegroundColor Green "Recording to $TestRecordingFile" + $Mock.SetRecord() + $null = erase -ea 0 $TestRecordingFile + } + 'playback' { + if (-not (Test-Path $TestRecordingFile)) { + Write-Host -fore:yellow "Recording file '$TestRecordingFile' is not present. Tests expecting recorded responses will fail" + } else { + Write-Host -ForegroundColor Green "Using recording $TestRecordingFile" + } + $Mock.SetPlayback() + $Mock.ForceResponseHeaders["Retry-After"] = "0"; + } + default: { + $Mock.SetLive() + } +} + +# overrides for Pester Describe/Context/It + +function Describe( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushDescription($Name) + try { + return pester\Describe -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopDescription() + } +} + +function Context( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushContext($Name) + try { + return pester\Context -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopContext() + } +} + +function It { + [CmdletBinding(DefaultParameterSetName = 'Normal')] + param( + [Parameter(Mandatory = $true, Position = 0)] + [string]$Name, + + [Parameter(Position = 1)] + [ScriptBlock] $Test = { }, + + [System.Collections.IDictionary[]] $TestCases, + + [Parameter(ParameterSetName = 'Pending')] + [Switch] $Pending, + + [Parameter(ParameterSetName = 'Skip')] + [Alias('Ignore')] + [Switch] $Skip + ) + $Mock.PushScenario($Name) + + try { + if ($skip) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Skip + } + if ($pending) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Pending + } + return pester\It -Name $Name -Test $Test -TestCases $TestCases + } + finally { + $null = $Mock.PopScenario() + } +} + +# set the HttpPipelineAppend for all the cmdlets +$PSDefaultParameterValues["*:HttpPipelinePrepend"] = $Mock diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/IAssociativeArray.cs b/src/Oracle/Oracle.Autorest/generated/runtime/IAssociativeArray.cs new file mode 100644 index 000000000000..84de86e3a9ec --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/IAssociativeArray.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +#define DICT_PROPERTIES +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + /// A subset of IDictionary that doesn't implement IEnumerable or IDictionary to work around PowerShell's aggressive formatter + public interface IAssociativeArray + { +#if DICT_PROPERTIES + System.Collections.Generic.IEnumerable Keys { get; } + System.Collections.Generic.IEnumerable Values { get; } + int Count { get; } +#endif + System.Collections.Generic.IDictionary AdditionalProperties { get; } + T this[string index] { get; set; } + void Add(string key, T value); + bool ContainsKey(string key); + bool Remove(string key); + bool TryGetValue(string key, out T value); + void Clear(); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/IHeaderSerializable.cs b/src/Oracle/Oracle.Autorest/generated/runtime/IHeaderSerializable.cs new file mode 100644 index 000000000000..42bc64d7a842 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/IHeaderSerializable.cs @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + public interface IHeaderSerializable + { + void ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/ISendAsync.cs b/src/Oracle/Oracle.Autorest/generated/runtime/ISendAsync.cs new file mode 100644 index 000000000000..1ef2b83b0d8b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/ISendAsync.cs @@ -0,0 +1,413 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + using System; + + + /// + /// The interface for sending an HTTP request across the wire. + /// + public interface ISendAsync + { + Task SendAsync(HttpRequestMessage request, IEventListener callback); + } + + public class SendAsyncTerminalFactory : ISendAsyncTerminalFactory, ISendAsync + { + SendAsync implementation; + + public SendAsyncTerminalFactory(SendAsync implementation) => this.implementation = implementation; + public SendAsyncTerminalFactory(ISendAsync implementation) => this.implementation = implementation.SendAsync; + public ISendAsync Create() => this; + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback); + } + + public partial class SendAsyncFactory : ISendAsyncFactory + { + public class Sender : ISendAsync + { + internal ISendAsync next; + internal SendAsyncStep implementation; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback, next); + } + SendAsyncStep implementation; + + public SendAsyncFactory(SendAsyncStep implementation) => this.implementation = implementation; + public ISendAsync Create(ISendAsync next) => new Sender { next = next, implementation = implementation }; + + } + + public class HttpClientFactory : ISendAsyncTerminalFactory, ISendAsync + { + HttpClient client; + public HttpClientFactory() : this(new HttpClient()) + { + } + public HttpClientFactory(HttpClient client) => this.client = client; + public ISendAsync Create() => this; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, callback.Token); + } + + public interface ISendAsyncFactory + { + ISendAsync Create(ISendAsync next); + } + + public interface ISendAsyncTerminalFactory + { + ISendAsync Create(); + } + + public partial class HttpPipeline : ISendAsync + { + private const int DefaultMaxRetry = 3; + private ISendAsync pipeline; + private ISendAsyncTerminalFactory terminal; + private List steps = new List(); + + public HttpPipeline() : this(new HttpClientFactory()) + { + } + + public HttpPipeline(ISendAsyncTerminalFactory terminalStep) + { + if (terminalStep == null) + { + throw new System.ArgumentNullException(nameof(terminalStep), "Terminal Step Factory in HttpPipeline may not be null"); + } + TerminalFactory = terminalStep; + } + + /// + /// Returns an HttpPipeline with the current state of this pipeline. + /// + public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + + private bool shouldRetry429(HttpResponseMessage response) + { + if (response.StatusCode == (System.Net.HttpStatusCode)429) + { + var retryAfter = response.Headers.RetryAfter; + if (retryAfter != null && retryAfter.Delta.HasValue) + { + return true; + } + } + return false; + } + /// + /// The step to handle 429 response with retry-after header. + /// + public async Task Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = int.MaxValue; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES_FOR_429")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES_FOR_429")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetry429(response) && count++ < retryCount) + { + request = await cloneRequest.CloneWithContent(); + var retryAfter = response.Headers.RetryAfter; + await Task.Delay(retryAfter.Delta.Value, callback.Token); + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code 429 after waiting {retryAfter.Delta.Value.TotalSeconds} seconds."); + response = await next.SendAsync(request, callback); + } + return response; + } + + private bool shouldRetryError(HttpResponseMessage response) + { + if (response.StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + if (response.StatusCode != System.Net.HttpStatusCode.NotImplemented && + response.StatusCode != System.Net.HttpStatusCode.HttpVersionNotSupported) + { + return true; + } + } + else if (response.StatusCode == System.Net.HttpStatusCode.RequestTimeout) + { + return true; + } + else if (response.StatusCode == (System.Net.HttpStatusCode)429 && response.Headers.RetryAfter == null) + { + return true; + } + return false; + } + + /// + /// Returns true if status code in HttpRequestExceptionWithStatus exception is greater + /// than or equal to 500 and not NotImplemented (501) or HttpVersionNotSupported (505). + /// Or it's 429 (TOO MANY REQUESTS) without Retry-After header. + /// + public async Task RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + int retryCount = DefaultMaxRetry; + + try + { + try + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("PS_HTTP_MAX_RETRIES")); + } + finally + { + retryCount = int.Parse(System.Environment.GetEnvironmentVariable("AZURE_PS_HTTP_MAX_RETRIES")); + } + } + catch (System.Exception) + { + //no action + } + var cloneRequest = await request.CloneWithContent(); + var response = await next.SendAsync(request, callback); + int count = 0; + while (shouldRetryError(response) && count++ < retryCount) + { + await callback.Signal("Debug", $"Start to retry {count} time(s) on status code {response.StatusCode}"); + request = await cloneRequest.CloneWithContent(); + response = await next.SendAsync(request, callback); + } + return response; + } + + public ISendAsyncTerminalFactory TerminalFactory + { + get => terminal; + set + { + if (value == null) + { + throw new System.ArgumentNullException("TerminalFactory in HttpPipeline may not be null"); + } + terminal = value; + } + } + + public ISendAsync Pipeline + { + get + { + // if the pipeline has been created and not invalidated, return it. + if (this.pipeline != null) + { + return this.pipeline; + } + + // create the pipeline from scratch. + var next = terminal.Create(); + if (Convert.ToBoolean(@"true")) + { + next = (new SendAsyncFactory(Retry429)).Create(next) ?? next; + next = (new SendAsyncFactory(RetryError)).Create(next) ?? next; + } + foreach (var factory in steps) + { + // skip factories that return null. + next = factory.Create(next) ?? next; + } + return this.pipeline = next; + } + } + + public int Count => steps.Count; + + public HttpPipeline Prepend(ISendAsyncFactory item) + { + if (item != null) + { + steps.Add(item); + pipeline = null; + } + return this; + } + + public HttpPipeline Append(SendAsyncStep item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStep item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Append(ISendAsyncFactory item) + { + if (item != null) + { + steps.Insert(0, item); + pipeline = null; + } + return this; + } + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(item); + } + } + return this; + } + + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(item); + } + } + return this; + } + + // you can use this as the ISendAsync Implementation + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => Pipeline.SendAsync(request, callback); + } + + internal static partial class Extensions + { + internal static HttpRequestMessage CloneAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.Clone(requestUri, method); + } + } + + internal static Task CloneWithContentAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.CloneWithContent(requestUri, method); + } + } + + /// + /// Clones an HttpRequestMessage (without the content) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = new HttpRequestMessage + { + Method = method ?? original.Method, + RequestUri = requestUri ?? original.RequestUri, + Version = original.Version, + }; + + foreach (KeyValuePair prop in original.Properties) + { + clone.Properties.Add(prop); + } + + foreach (KeyValuePair> header in original.Headers) + { + /* + **temporarily skip cloning telemetry related headers** + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + */ + if (!"x-ms-unique-id".Equals(header.Key) && !"x-ms-client-request-id".Equals(header.Key) && !"CommandName".Equals(header.Key) && !"FullCommandName".Equals(header.Key) && !"ParameterSetName".Equals(header.Key) && !"User-Agent".Equals(header.Key)) + { + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + } + + return clone; + } + + /// + /// Clones an HttpRequestMessage (including the content stream and content headers) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = original.Clone(requestUri, method); + var stream = new System.IO.MemoryStream(); + if (original.Content != null) + { + await original.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Position = 0; + clone.Content = new StreamContent(stream); + if (original.Content.Headers != null) + { + foreach (var h in original.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } + } + } + return clone; + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/InfoAttribute.cs b/src/Oracle/Oracle.Autorest/generated/runtime/InfoAttribute.cs new file mode 100644 index 000000000000..6e8bda8b5739 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/InfoAttribute.cs @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class)] + public class InfoAttribute : Attribute + { + public bool Required { get; set; } = false; + public bool ReadOnly { get; set; } = false; + public bool Read { get; set; } = true; + public bool Create { get; set; } = true; + public bool Update { get; set; } = true; + public Type[] PossibleTypes { get; set; } = new Type[0]; + public string Description { get; set; } = ""; + public string SerializedName { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class CompleterInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class DefaultInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + public string SetCondition { get; set; } = ""; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/InputHandler.cs b/src/Oracle/Oracle.Autorest/generated/runtime/InputHandler.cs new file mode 100644 index 000000000000..75c26a872f49 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/InputHandler.cs @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Cmdlets +{ + public abstract class InputHandler + { + protected InputHandler NextHandler = null; + + public void SetNextHandler(InputHandler nextHandler) + { + this.NextHandler = nextHandler; + } + + public abstract void Process(Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.IContext context); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Iso/IsoDate.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Iso/IsoDate.cs new file mode 100644 index 000000000000..d98697568965 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Iso/IsoDate.cs @@ -0,0 +1,214 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal struct IsoDate + { + internal int Year { get; set; } // 0-3000 + + internal int Month { get; set; } // 1-12 + + internal int Day { get; set; } // 1-31 + + internal int Hour { get; set; } // 0-24 + + internal int Minute { get; set; } // 0-60 (60 is a special case) + + internal int Second { get; set; } // 0-60 (60 is used for leap seconds) + + internal double Millisecond { get; set; } // 0-999.9... + + internal TimeSpan Offset { get; set; } + + internal DateTimeKind Kind { get; set; } + + internal TimeSpan TimeOfDay => new TimeSpan(Hour, Minute, Second); + + internal DateTime ToDateTime() + { + if (Kind == DateTimeKind.Utc || Offset == TimeSpan.Zero) + { + return new DateTime(Year, Month, Day, Hour, Minute, Second, (int)Millisecond, DateTimeKind.Utc); + } + + return ToDateTimeOffset().DateTime; + } + + internal DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( + Year, + Month, + Day, + Hour, + Minute, + Second, + (int)Millisecond, + Offset + ); + } + + internal DateTime ToUtcDateTime() + { + return ToDateTimeOffset().UtcDateTime; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + // yyyy-MM-dd + sb.Append($"{Year}-{Month:00}-{Day:00}"); + + if (TimeOfDay > new TimeSpan(0)) + { + sb.Append($"T{Hour:00}:{Minute:00}"); + + if (TimeOfDay.Seconds > 0) + { + sb.Append($":{Second:00}"); + } + } + + if (Offset.Ticks == 0) + { + sb.Append('Z'); // UTC + } + else + { + if (Offset.Ticks >= 0) + { + sb.Append('+'); + } + + sb.Append($"{Offset.Hours:00}:{Offset.Minutes:00}"); + } + + return sb.ToString(); + } + + internal static IsoDate FromDateTimeOffset(DateTimeOffset date) + { + return new IsoDate { + Year = date.Year, + Month = date.Month, + Day = date.Day, + Hour = date.Hour, + Minute = date.Minute, + Second = date.Second, + Offset = date.Offset, + Kind = date.Offset == TimeSpan.Zero ? DateTimeKind.Utc : DateTimeKind.Unspecified + }; + } + + private static readonly char[] timeSeperators = { ':', '.' }; + + internal static IsoDate Parse(string text) + { + var tzIndex = -1; + var timeIndex = text.IndexOf('T'); + + var builder = new IsoDate { Day = 1, Month = 1 }; + + // TODO: strip the time zone offset off the end + string dateTime = text; + string timeZone = null; + + if (dateTime.IndexOf('Z') > -1) + { + tzIndex = dateTime.LastIndexOf('Z'); + + builder.Kind = DateTimeKind.Utc; + } + else if (dateTime.LastIndexOf('+') > 10) + { + tzIndex = dateTime.LastIndexOf('+'); + } + else if (dateTime.LastIndexOf('-') > 10) + { + tzIndex = dateTime.LastIndexOf('-'); + } + + if (tzIndex > -1) + { + timeZone = dateTime.Substring(tzIndex); + dateTime = dateTime.Substring(0, tzIndex); + } + + string date = (timeIndex == -1) ? dateTime : dateTime.Substring(0, timeIndex); + + var dateParts = date.Split(Seperator.Dash); // '-' + + for (int i = 0; i < dateParts.Length; i++) + { + var part = dateParts[i]; + + switch (i) + { + case 0: builder.Year = int.Parse(part); break; + case 1: builder.Month = int.Parse(part); break; + case 2: builder.Day = int.Parse(part); break; + } + } + + if (timeIndex > -1) + { + string[] timeParts = dateTime.Substring(timeIndex + 1).Split(timeSeperators); + + for (int i = 0; i < timeParts.Length; i++) + { + var part = timeParts[i]; + + switch (i) + { + case 0: builder.Hour = int.Parse(part); break; + case 1: builder.Minute = int.Parse(part); break; + case 2: builder.Second = int.Parse(part); break; + case 3: builder.Millisecond = double.Parse("0." + part) * 1000; break; + } + } + } + + if (timeZone != null && timeZone != "Z") + { + var hours = int.Parse(timeZone.Substring(1, 2)); + var minutes = int.Parse(timeZone.Substring(4, 2)); + + if (timeZone[0] == '-') + { + hours = -hours; + minutes = -minutes; + } + + builder.Offset = new TimeSpan(hours, minutes, 0); + } + + return builder; + } + } + + /* + YYYY # eg 1997 + YYYY-MM # eg 1997-07 + YYYY-MM-DD # eg 1997-07-16 + YYYY-MM-DDThh:mmTZD # eg 1997-07-16T19:20+01:00 + YYYY-MM-DDThh:mm:ssTZD # eg 1997-07-16T19:20:30+01:00 + YYYY-MM-DDThh:mm:ss.sTZD # eg 1997-07-16T19:20:30.45+01:00 + + where: + + YYYY = four-digit year + MM = two-digit month (01=January, etc.) + DD = two-digit day of month (01 through 31) + hh = two digits of hour (00 through 23) (am/pm NOT allowed) + mm = two digits of minute (00 through 59) + ss = two digits of second (00 through 59) + s = one or more digits representing a decimal fraction of a second + TZD = time zone designator (Z or +hh:mm or -hh:mm) + */ +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/JsonType.cs b/src/Oracle/Oracle.Autorest/generated/runtime/JsonType.cs new file mode 100644 index 000000000000..1ed43a33ffa5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/JsonType.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal enum JsonType + { + Null = 0, + Object = 1, + Array = 2, + Binary = 3, + Boolean = 4, + Date = 5, + Number = 6, + String = 7 + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/MessageAttribute.cs b/src/Oracle/Oracle.Autorest/generated/runtime/MessageAttribute.cs new file mode 100644 index 000000000000..565a84a9fcea --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/MessageAttribute.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; + using System.Management.Automation; + using System.Text; + + [AttributeUsage(AttributeTargets.All)] + public class GenericBreakingChangeAttribute : Attribute + { + private string _message; + //A dexcription of what the change is about, non mandatory + public string ChangeDescription { get; set; } = null; + + //The version the change is effective from, non mandatory + public string DeprecateByVersion { get; } + public string DeprecateByAzVersion { get; } + + //The date on which the change comes in effect + public DateTime ChangeInEfectByDate { get; } + public bool ChangeInEfectByDateSet { get; } = false; + + //Old way of calling the cmdlet + public string OldWay { get; set; } + //New way fo calling the cmdlet + public string NewWay { get; set; } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) + { + _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; + this.DeprecateByVersion = deprecateByVersion; + } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) + { + _message = message; + this.DeprecateByVersion = deprecateByVersion; + this.DeprecateByAzVersion = deprecateByAzVersion; + + if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.ChangeInEfectByDate = result; + this.ChangeInEfectByDateSet = true; + } + } + + public DateTime getInEffectByDate() + { + return this.ChangeInEfectByDate.Date; + } + + + /** + * This function prints out the breaking change message for the attribute on the cmdline + * */ + public void PrintCustomAttributeInfo(Action writeOutput) + { + + if (!GetAttributeSpecificMessage().StartsWith(Environment.NewLine)) + { + writeOutput(Environment.NewLine); + } + writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage())); + + + if (!string.IsNullOrWhiteSpace(ChangeDescription)) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesChangeDescriptionMessage, this.ChangeDescription)); + } + + if (ChangeInEfectByDateSet) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); + } + + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + + if (OldWay != null && NewWay != null) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesUsageChangeMessageConsole, OldWay, NewWay)); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + + protected virtual string GetAttributeSpecificMessage() + { + return _message; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute + { + + public string ReplacementCmdletName { get; set; } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + } + + protected override string GetAttributeSpecificMessage() + { + if (string.IsNullOrWhiteSpace(ReplacementCmdletName)) + { + return Resources.BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement; + } + else + { + return string.Format(Resources.BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement, ReplacementCmdletName); + } + } + } + + [AttributeUsage(AttributeTargets.All)] + public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string[] ChangedParameterSet { set; get; } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + ChangedParameterSet = changedParameterSet; + } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + ChangedParameterSet = changedParameterSet; + } + + protected override string GetAttributeSpecificMessage() + { + + return Resources.BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement; + + } + + public bool IsApplicableToInvocation(InvocationInfo invocation, string parameterSetName) + { + if (ChangedParameterSet != null) + return ChangedParameterSet.Contains(parameterSetName); + return false; + } + + } + + [AttributeUsage(AttributeTargets.All)] + public class PreviewMessageAttribute : Attribute + { + public string _message; + + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + + public PreviewMessageAttribute() + { + this._message = Resources.PreviewCmdletMessage; + } + + public PreviewMessageAttribute(string message) + { + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; + } + + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) + { + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string NameOfParameterChanging { get; } + + public string ReplaceMentCmdletParameterName { get; set; } = null; + + public bool IsBecomingMandatory { get; set; } = false; + + public String OldParamaterType { get; set; } + + public String NewParameterType { get; set; } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + if (!string.IsNullOrWhiteSpace(ReplaceMentCmdletParameterName)) + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplacedMandatory, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplaced, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + } + else + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterMandatoryNow, NameOfParameterChanging)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterChanging, NameOfParameterChanging)); + } + } + + //See if the type of the param is changing + if (OldParamaterType != null && !string.IsNullOrWhiteSpace(NewParameterType)) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType, NewParameterType)); + } + return message.ToString(); + } + + /// + /// See if the bound parameters contain the current parameter, if they do + /// then the attribbute is applicable + /// If the invocationInfo is null we return true + /// + /// + /// bool + public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) + { + bool? applicable = invocationInfo == null ? true : invocationInfo.BoundParameters?.Keys?.Contains(this.NameOfParameterChanging); + return applicable.HasValue ? applicable.Value : false; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string DeprecatedCmdLetOutputType { get; } + + //This is still a String instead of a Type as this + //might be undefined at the time of adding the attribute + public string ReplacementCmdletOutputType { get; set; } + + public string[] DeprecatedOutputProperties { get; set; } + + public string[] NewOutputProperties { get; set; } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + + //check for the deprecation scenario + if (string.IsNullOrWhiteSpace(ReplacementCmdletOutputType) && NewOutputProperties == null && DeprecatedOutputProperties == null && string.IsNullOrWhiteSpace(ChangeDescription)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputTypeDeprecated, DeprecatedCmdLetOutputType)); + } + else + { + if (!string.IsNullOrWhiteSpace(ReplacementCmdletOutputType)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange1, DeprecatedCmdLetOutputType, ReplacementCmdletOutputType)); + } + else + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange2, DeprecatedCmdLetOutputType)); + } + + if (DeprecatedOutputProperties != null && DeprecatedOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesRemoved); + foreach (string property in DeprecatedOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + + if (NewOutputProperties != null && NewOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesAdded); + foreach (string property in NewOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + } + return message.ToString(); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/Oracle/Oracle.Autorest/generated/runtime/MessageAttributeHelper.cs new file mode 100644 index 000000000000..b52f4a18c183 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -0,0 +1,184 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using System.Reflection; + using System.Text; + using System.Threading.Tasks; + public class MessageAttributeHelper + { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; + public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And reads all the deprecation attributes attached to it + * Prints a message on the cmdline For each of the attribute found + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + * */ + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) + { + bool supressWarningOrError = false; + + try + { + supressWarningOrError = bool.Parse(System.Environment.GetEnvironmentVariable(SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME)); + } + catch (Exception) + { + //no action + } + + if (supressWarningOrError) + { + //Do not process the attributes at runtime... The env variable to override the warning messages is set + return; + } + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (attributes != null && attributes.Count > 0) + { + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + + foreach (GenericBreakingChangeAttribute attribute in attributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + + psCmdlet.WriteWarning(sb.ToString()); + } + } + + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (previewAttributes != null && previewAttributes.Count > 0) + { + foreach (PreviewMessageAttribute attribute in previewAttributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + psCmdlet.WriteWarning(sb.ToString()); + } + } + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And returns all the deprecation attributes attached to it + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + **/ + private static IEnumerable GetAllBreakingChangeAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet) + { + List attributeList = new List(); + + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); + } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + List attributeList = new List(); + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.IsApplicableToInvocation(invocationInfo)); + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Method.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Method.cs new file mode 100644 index 000000000000..8e9159cd0164 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Method.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + internal static class Method + { + internal static System.Net.Http.HttpMethod Get = System.Net.Http.HttpMethod.Get; + internal static System.Net.Http.HttpMethod Put = System.Net.Http.HttpMethod.Put; + internal static System.Net.Http.HttpMethod Head = System.Net.Http.HttpMethod.Head; + internal static System.Net.Http.HttpMethod Post = System.Net.Http.HttpMethod.Post; + internal static System.Net.Http.HttpMethod Delete = System.Net.Http.HttpMethod.Delete; + internal static System.Net.Http.HttpMethod Options = System.Net.Http.HttpMethod.Options; + internal static System.Net.Http.HttpMethod Trace = System.Net.Http.HttpMethod.Trace; + internal static System.Net.Http.HttpMethod Patch = new System.Net.Http.HttpMethod("PATCH"); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonMember.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonMember.cs new file mode 100644 index 000000000000..5c9595ef741f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonMember.cs @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + + + internal sealed class JsonMember + { + private readonly TypeDetails type; + + private readonly Func getter; + private readonly Action setter; + + internal JsonMember(PropertyInfo property, int defaultOrder) + { + getter = property.GetValue; + setter = property.SetValue; + + var dataMember = property.GetCustomAttribute(); + + Name = dataMember?.Name ?? property.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(property.PropertyType); + + CanRead = property.CanRead; + } + + internal JsonMember(FieldInfo field, int defaultOrder) + { + getter = field.GetValue; + setter = field.SetValue; + + var dataMember = field.GetCustomAttribute(); + + Name = dataMember?.Name ?? field.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(field.FieldType); + + CanRead = true; + } + + internal string Name { get; } + + internal int Order { get; } + + internal TypeDetails TypeDetails => type; + + internal Type Type => type.NonNullType; + + internal bool IsList => type.IsList; + + // Arrays, Sets, ... + internal Type ElementType => type.ElementType; + + internal IJsonConverter Converter => type.JsonConverter; + + internal bool EmitDefaultValue { get; } + + internal bool IsStringLike => type.IsStringLike; + + internal object DefaultValue => type.DefaultValue; + + internal bool CanRead { get; } + + #region Helpers + + internal object GetValue(object instance) => getter(instance); + + internal void SetValue(object instance, object value) => setter(instance, value); + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModel.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModel.cs new file mode 100644 index 000000000000..e0898e2f0402 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModel.cs @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal class JsonModel + { + private Dictionary map; + private readonly object _sync = new object(); + + private JsonModel(Type type, List members) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Members = members ?? throw new ArgumentNullException(nameof(members)); + } + + internal string Name => Type.Name; + + internal Type Type { get; } + + internal List Members { get; } + + internal JsonMember this[string name] + { + get + { + if (map == null) + { + lock (_sync) + { + if (map == null) + { + map = new Dictionary(); + + foreach (JsonMember m in Members) + { + map[m.Name.ToLower()] = m; + } + } + } + } + + + map.TryGetValue(name.ToLower(), out JsonMember member); + + return member; + } + } + + internal static JsonModel FromType(Type type) + { + var members = new List(); + + int i = 0; + + // BindingFlags.Instance | BindingFlags.Public + + foreach (var member in type.GetFields()) + { + if (member.IsStatic) continue; + + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + foreach (var member in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + members.Sort((a, b) => a.Order.CompareTo(b.Order)); // inline sort + + return new JsonModel(type, members); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModelCache.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModelCache.cs new file mode 100644 index 000000000000..75000b3b7409 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Models/JsonModelCache.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal static class JsonModelCache + { + private static readonly ConditionalWeakTable cache + = new ConditionalWeakTable(); + + internal static JsonModel Get(Type type) => cache.GetValue(type, Create); + + private static JsonModel Create(Type type) => JsonModel.FromType(type); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs new file mode 100644 index 000000000000..f1e7046d856b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/JsonArray.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public abstract partial class JsonArray : JsonNode, IEnumerable + { + internal override JsonType Type => JsonType.Array; + + internal abstract JsonType? ElementType { get; } + + public abstract int Count { get; } + + internal virtual bool IsSet => false; + + internal bool IsEmpty => Count == 0; + + #region IEnumerable + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + #endregion + + #region Static Helpers + + internal static JsonArray Create(short[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(int[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(long[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(decimal[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(float[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(string[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(XBinary[] values) + => new XImmutableArray(values); + + #endregion + + internal static new JsonArray Parse(string text) + => (JsonArray)JsonNode.Parse(text); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs new file mode 100644 index 000000000000..23caa6e77a5c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XImmutableArray.cs @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal sealed class XImmutableArray : JsonArray, IEnumerable + { + private readonly T[] values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XImmutableArray(T[] values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Length; + + public bool IsReadOnly => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + #region Static Constructor + + internal XImmutableArray Create(T[] items) + { + return new XImmutableArray(items); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XList.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XList.cs new file mode 100644 index 000000000000..6de585748727 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XList.cs @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal sealed class XList : JsonArray, IEnumerable + { + private readonly IList values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XList(IList values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Count; + + public bool IsReadOnly => values.IsReadOnly; + + #region IList + + public void Add(T value) + { + values.Add(value); + } + + public bool Contains(T value) => values.Contains(value); + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs new file mode 100644 index 000000000000..1336bdb36d87 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed partial class XNodeArray : JsonArray, ICollection + { + private readonly List items; + + internal XNodeArray() + { + items = new List(); + } + + internal XNodeArray(params JsonNode[] values) + { + items = new List(values); + } + + internal XNodeArray(System.Collections.Generic.List values) + { + items = new List(values); + } + + public override JsonNode this[int index] => items[index]; + + internal override JsonType? ElementType => null; + + public bool IsReadOnly => false; + + public override int Count => items.Count; + + #region ICollection Members + + public void Add(JsonNode item) + { + items.Add(item); + } + + void ICollection.Clear() + { + items.Clear(); + } + + public bool Contains(JsonNode item) => items.Contains(item); + + void ICollection.CopyTo(JsonNode[] array, int arrayIndex) + { + items.CopyTo(array, arrayIndex); + } + + public bool Remove(JsonNode item) + { + return items.Remove(item); + } + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XSet.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XSet.cs new file mode 100644 index 000000000000..68efaa74f4f3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/Collections/XSet.cs @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal sealed class XSet : JsonArray, IEnumerable + { + private readonly HashSet values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XSet(IEnumerable values) + : this(new HashSet(values)) + { } + + internal XSet(HashSet values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + internal override JsonType Type => JsonType.Array; + + internal override JsonType? ElementType => elementType; + + public bool IsReadOnly => true; + + public override int Count => values.Count; + + internal override bool IsSet => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + internal HashSet AsHashSet() => values; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonBoolean.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonBoolean.cs new file mode 100644 index 000000000000..dde0366662fb --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonBoolean.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal sealed partial class JsonBoolean : JsonNode + { + internal static readonly JsonBoolean True = new JsonBoolean(true); + internal static readonly JsonBoolean False = new JsonBoolean(false); + + internal JsonBoolean(bool value) + { + Value = value; + } + + internal bool Value { get; } + + internal override JsonType Type => JsonType.Boolean; + + internal static new JsonBoolean Parse(string text) + { + switch (text) + { + case "false": return False; + case "true": return True; + + default: throw new ArgumentException($"Expected true or false. Was {text}."); + } + } + + #region Implicit Casts + + public static implicit operator bool(JsonBoolean data) => data.Value; + + public static implicit operator JsonBoolean(bool data) => new JsonBoolean(data); + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonDate.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonDate.cs new file mode 100644 index 000000000000..8d10071fcca3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonDate.cs @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + + + internal sealed partial class JsonDate : JsonNode, IEquatable, IComparable + { + internal static bool AssumeUtcWhenKindIsUnspecified = true; + + private readonly DateTimeOffset value; + + internal JsonDate(DateTime value) + { + if (value.Kind == DateTimeKind.Unspecified && AssumeUtcWhenKindIsUnspecified) + { + value = DateTime.SpecifyKind(value, DateTimeKind.Utc); + } + + this.value = value; + } + + internal JsonDate(DateTimeOffset value) + { + this.value = value; + } + + internal override JsonType Type => JsonType.Date; + + #region Helpers + + internal DateTimeOffset ToDateTimeOffset() + { + return value; + } + + internal DateTime ToDateTime() + { + if (value.Offset == TimeSpan.Zero) + { + return value.UtcDateTime; + } + + return value.DateTime; + } + + internal DateTime ToUtcDateTime() => value.UtcDateTime; + + internal int ToUnixTimeSeconds() + { + return (int)value.ToUnixTimeSeconds(); + } + + internal long ToUnixTimeMilliseconds() + { + return (int)value.ToUnixTimeMilliseconds(); + } + + internal string ToIsoString() + { + return IsoDate.FromDateTimeOffset(value).ToString(); + } + + #endregion + + public override string ToString() + { + return ToIsoString(); + } + + internal static new JsonDate Parse(string text) + { + if (text == null) throw new ArgumentNullException(nameof(text)); + + // TODO support: unixtimeseconds.partialseconds + + if (text.Length > 4 && _IsNumber(text)) // UnixTime + { + var date = DateTimeOffset.FromUnixTimeSeconds(long.Parse(text)); + + return new JsonDate(date); + } + else if (text.Length <= 4 || text[4] == '-') // ISO: 2012- + { + return new JsonDate(IsoDate.Parse(text).ToDateTimeOffset()); + } + else + { + // NOT ISO ENCODED + // "Thu, 5 Apr 2012 16:59:01 +0200", + return new JsonDate(DateTimeOffset.Parse(text)); + } + } + + private static bool _IsNumber(string text) + { + foreach (var c in text) + { + if (!char.IsDigit(c)) return false; + } + + return true; + } + + internal static JsonDate FromUnixTime(int seconds) + { + return new JsonDate(DateTimeOffset.FromUnixTimeSeconds(seconds)); + } + + internal static JsonDate FromUnixTime(double seconds) + { + var milliseconds = (long)(seconds * 1000d); + + return new JsonDate(DateTimeOffset.FromUnixTimeMilliseconds(milliseconds)); + } + + #region Implicit Casts + + public static implicit operator DateTimeOffset(JsonDate value) + => value.ToDateTimeOffset(); + + public static implicit operator DateTime(JsonDate value) + => value.ToDateTime(); + + // From Date + public static implicit operator JsonDate(DateTimeOffset value) + { + return new JsonDate(value); + } + + public static implicit operator JsonDate(DateTime value) + { + return new JsonDate(value); + } + + // From String + public static implicit operator JsonDate(string value) + { + return Parse(value); + } + + #endregion + + #region Equality + + public override bool Equals(object obj) + { + return obj is JsonDate date && date.value == this.value; + } + + public bool Equals(JsonDate other) + { + return this.value == other.value; + } + + public override int GetHashCode() => value.GetHashCode(); + + #endregion + + #region IComparable Members + + int IComparable.CompareTo(JsonDate other) + { + return value.CompareTo(other.value); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNode.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNode.cs new file mode 100644 index 000000000000..d28d37bf86ee --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNode.cs @@ -0,0 +1,250 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + + + public abstract partial class JsonNode + { + internal abstract JsonType Type { get; } + + public virtual JsonNode this[int index] => throw new NotImplementedException(); + + public virtual JsonNode this[string name] + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + #region Type Helpers + + internal bool IsArray => Type == JsonType.Array; + + internal bool IsDate => Type == JsonType.Date; + + internal bool IsObject => Type == JsonType.Object; + + internal bool IsNumber => Type == JsonType.Number; + + internal bool IsNull => Type == JsonType.Null; + + #endregion + + internal void WriteTo(TextWriter textWriter, bool pretty = true) + { + var writer = new JsonWriter(textWriter, pretty); + + writer.WriteNode(this); + } + + internal T As() + where T : new() + => new JsonSerializer().Deseralize((JsonObject)this); + + internal T[] ToArrayOf() + { + return (T[])new JsonSerializer().DeserializeArray(typeof(T[]), (JsonArray)this); + } + + #region ToString Overrides + + public override string ToString() => ToString(pretty: true); + + internal string ToString(bool pretty) + { + var sb = new StringBuilder(); + + using (var writer = new StringWriter(sb)) + { + WriteTo(writer, pretty); + + return sb.ToString(); + } + } + + #endregion + + #region Static Constructors + + internal static JsonNode Parse(string text) + { + return Parse(new SourceReader(new StringReader(text))); + } + + internal static JsonNode Parse(TextReader textReader) + => Parse(new SourceReader(textReader)); + + private static JsonNode Parse(SourceReader sourceReader) + { + using (var parser = new JsonParser(sourceReader)) + { + return parser.ReadNode(); + } + } + + internal static JsonNode FromObject(object instance) + => new JsonSerializer().Serialize(instance); + + #endregion + + #region Implict Casts + + public static implicit operator string(JsonNode node) => node.ToString(); + + #endregion + + #region Explict Casts + + public static explicit operator DateTime(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date: + return ((JsonDate)node).ToDateTime(); + + case JsonType.String: + return JsonDate.Parse(node.ToString()).ToDateTime(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num).UtcDateTime; + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)).UtcDateTime; + } + } + + throw new ConversionException(node, typeof(DateTime)); + } + + public static explicit operator DateTimeOffset(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date : return ((JsonDate)node).ToDateTimeOffset(); + case JsonType.String : return JsonDate.Parse(node.ToString()).ToDateTimeOffset(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num); + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)); + } + + } + + throw new ConversionException(node, typeof(DateTimeOffset)); + } + + public static explicit operator float(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return float.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(float)); + } + + public static explicit operator double(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return double.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(double)); + } + + public static explicit operator decimal(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return decimal.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(decimal)); + } + + public static explicit operator Guid(JsonNode node) + => new Guid(node.ToString()); + + public static explicit operator short(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return short.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(short)); + } + + public static explicit operator int(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return int.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(int)); + } + + public static explicit operator long(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return long.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(long)); + } + + public static explicit operator bool(JsonNode node) + => ((JsonBoolean)node).Value; + + public static explicit operator ushort(JsonNode node) + => (JsonNumber)node; + + public static explicit operator uint(JsonNode node) + => (JsonNumber)node; + + public static explicit operator ulong(JsonNode node) + => (JsonNumber)node; + + public static explicit operator TimeSpan(JsonNode node) + => TimeSpan.Parse(node.ToString()); + + public static explicit operator Uri(JsonNode node) + { + if (node.Type == JsonType.String) + { + return new Uri(node.ToString()); + } + + throw new ConversionException(node, typeof(Uri)); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNumber.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNumber.cs new file mode 100644 index 000000000000..da7e53951ffc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonNumber.cs @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed partial class JsonNumber : JsonNode + { + private readonly string value; + private readonly bool overflows = false; + + internal JsonNumber(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal JsonNumber(int value) + { + this.value = value.ToString(); + } + + internal JsonNumber(long value) + { + this.value = value.ToString(); + + if (value > 9007199254740991) + { + overflows = true; + } + } + + internal JsonNumber(float value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal JsonNumber(double value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal override JsonType Type => JsonType.Number; + + internal string Value => value; + + #region Helpers + + internal bool Overflows => overflows; + + internal bool IsInteger => !value.Contains("."); + + internal bool IsFloat => value.Contains("."); + + #endregion + + #region Casting + + public static implicit operator byte(JsonNumber number) + => byte.Parse(number.Value); + + public static implicit operator short(JsonNumber number) + => short.Parse(number.Value); + + public static implicit operator int(JsonNumber number) + => int.Parse(number.Value); + + public static implicit operator long(JsonNumber number) + => long.Parse(number.value); + + public static implicit operator UInt16(JsonNumber number) + => ushort.Parse(number.Value); + + public static implicit operator UInt32(JsonNumber number) + => uint.Parse(number.Value); + + public static implicit operator UInt64(JsonNumber number) + => ulong.Parse(number.Value); + + public static implicit operator decimal(JsonNumber number) + => decimal.Parse(number.Value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator Double(JsonNumber number) + => double.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator float(JsonNumber number) + => float.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator JsonNumber(short data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(int data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(long data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(Single data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(double data) + => new JsonNumber(data.ToString()); + + #endregion + + public override string ToString() => value; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonObject.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonObject.cs new file mode 100644 index 000000000000..07e099d50b5e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonObject.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public partial class JsonObject : JsonNode, IDictionary + { + private readonly Dictionary items; + + internal JsonObject() + { + items = new Dictionary(); + } + + internal JsonObject(IEnumerable> properties) + { + if (properties == null) throw new ArgumentNullException(nameof(properties)); + + items = new Dictionary(); + + foreach (var field in properties) + { + items.Add(field.Key, field.Value); + } + } + + #region IDictionary Constructors + + internal JsonObject(IDictionary dic) + { + items = new Dictionary(dic.Count); + + foreach (var pair in dic) + { + Add(pair.Key, pair.Value); + } + } + + #endregion + + internal override JsonType Type => JsonType.Object; + + #region Add Overloads + + public void Add(string name, JsonNode value) => + items.Add(name, value); + + public void Add(string name, byte[] value) => + items.Add(name, new XBinary(value)); + + public void Add(string name, DateTime value) => + items.Add(name, new JsonDate(value)); + + public void Add(string name, int value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, long value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, float value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, double value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, string value) => + items.Add(name, new JsonString(value)); + + public void Add(string name, bool value) => + items.Add(name, new JsonBoolean(value)); + + public void Add(string name, Uri url) => + items.Add(name, new JsonString(url.AbsoluteUri)); + + public void Add(string name, string[] values) => + items.Add(name, new XImmutableArray(values)); + + public void Add(string name, int[] values) => + items.Add(name, new XImmutableArray(values)); + + #endregion + + #region ICollection> Members + + void ICollection>.Add(KeyValuePair item) + { + items.Add(item.Key, item.Value); + } + + void ICollection>.Clear() + { + items.Clear(); + } + + bool ICollection>.Contains(KeyValuePair item) => + throw new NotImplementedException(); + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + throw new NotImplementedException(); + + + int ICollection>.Count => items.Count; + + bool ICollection>.IsReadOnly => false; + + bool ICollection>.Remove(KeyValuePair item) => + throw new NotImplementedException(); + + #endregion + + #region IDictionary Members + + public bool ContainsKey(string key) => items.ContainsKey(key); + + public ICollection Keys => items.Keys; + + public bool Remove(string key) => items.Remove(key); + + public bool TryGetValue(string key, out JsonNode value) => + items.TryGetValue(key, out value); + + public ICollection Values => items.Values; + + public override JsonNode this[string key] + { + get => items[key]; + set => items[key] = value; + } + + #endregion + + #region IEnumerable + + IEnumerator> IEnumerable>.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + + #region Helpers + + internal static new JsonObject FromObject(object instance) => + (JsonObject)new JsonSerializer().Serialize(instance); + + #endregion + + #region Static Constructors + + internal static JsonObject FromStream(Stream stream) + { + using (var tr = new StreamReader(stream)) + { + return (JsonObject)Parse(tr); + } + } + + internal static new JsonObject Parse(string text) + { + return (JsonObject)JsonNode.Parse(text); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonString.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonString.cs new file mode 100644 index 000000000000..050e68a0ff55 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/JsonString.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed partial class JsonString : JsonNode, IEquatable + { + private readonly string value; + + internal JsonString(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal override JsonType Type => JsonType.String; + + internal string Value => value; + + internal int Length => value.Length; + + #region #region Implicit Casts + + public static implicit operator string(JsonString data) => data.Value; + + public static implicit operator JsonString(string value) => new JsonString(value); + + #endregion + + public override int GetHashCode() => value.GetHashCode(); + + public override string ToString() => value; + + #region IEquatable + + bool IEquatable.Equals(JsonString other) => this.Value == other.Value; + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XBinary.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XBinary.cs new file mode 100644 index 000000000000..84cddd2e6e54 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XBinary.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal sealed class XBinary : JsonNode + { + private readonly byte[] _value; + private readonly string _base64; + + internal XBinary(byte[] value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal XBinary(string base64EncodedString) + { + _base64 = base64EncodedString ?? throw new ArgumentNullException(nameof(base64EncodedString)); + } + + internal override JsonType Type => JsonType.Binary; + + internal byte[] Value => _value ?? Convert.FromBase64String(_base64); + + #region #region Implicit Casts + + public static implicit operator byte[] (XBinary data) => data.Value; + + public static implicit operator XBinary(byte[] data) => new XBinary(data); + + #endregion + + public override int GetHashCode() => Value.GetHashCode(); + + public override string ToString() => _base64 ?? Convert.ToBase64String(_value); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XNull.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XNull.cs new file mode 100644 index 000000000000..e0284134c33c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Nodes/XNull.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal sealed class XNull : JsonNode + { + internal static readonly XNull Instance = new XNull(); + + private XNull() { } + + internal override JsonType Type => JsonType.Null; + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs new file mode 100644 index 000000000000..1968f5ad81e2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Exceptions/ParseException.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal class ParserException : Exception + { + internal ParserException(string message) + : base(message) + { } + + internal ParserException(string message, SourceLocation location) + : base(message) + { + + Location = location; + } + + internal SourceLocation Location { get; } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonParser.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonParser.cs new file mode 100644 index 000000000000..71f1a5894391 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonParser.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public class JsonParser : IDisposable + { + private readonly TokenReader reader; + + internal JsonParser(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonParser(SourceReader sourceReader) + { + if (sourceReader == null) + throw new ArgumentNullException(nameof(sourceReader)); + + this.reader = new TokenReader(new JsonTokenizer(sourceReader)); + + this.reader.Next(); // Start with the first token + } + + internal IEnumerable ReadNodes() + { + JsonNode node; + + while ((node = ReadNode()) != null) yield return node; + } + + internal JsonNode ReadNode() + { + if (reader.Current.Kind == TokenKind.Eof || reader.Current.IsTerminator) + { + return null; + } + + switch (reader.Current.Kind) + { + case TokenKind.LeftBrace : return ReadObject(); // { + case TokenKind.LeftBracket : return ReadArray(); // [ + + default: throw new ParserException($"Expected '{{' or '['. Was {reader.Current}."); + } + } + + private JsonNode ReadFieldValue() + { + // Boolean, Date, Null, Number, String, Uri + if (reader.Current.IsLiteral) + { + return ReadLiteral(); + } + else + { + switch (reader.Current.Kind) + { + case TokenKind.LeftBracket: return ReadArray(); + case TokenKind.LeftBrace : return ReadObject(); + + default: throw new ParserException($"Unexpected token reading field value. Was {reader.Current}."); + } + } + } + + private JsonNode ReadLiteral() + { + var literal = reader.Current; + + reader.Next(); // Read the literal token + + switch (literal.Kind) + { + case TokenKind.Boolean : return JsonBoolean.Parse(literal.Value); + case TokenKind.Null : return XNull.Instance; + case TokenKind.Number : return new JsonNumber(literal.Value); + case TokenKind.String : return new JsonString(literal.Value); + + default: throw new ParserException($"Unexpected token reading literal. Was {literal}."); + } + } + + internal JsonObject ReadObject() + { + reader.Ensure(TokenKind.LeftBrace, "object"); + + reader.Next(); // Read '{' (Object start) + + var jsonObject = new JsonObject(); + + // Read the object's fields until we reach the end of the object ('}') + while (reader.Current.Kind != TokenKind.RightBrace) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read ',' (Seperator) + } + + // Ensure we have a field name + reader.Ensure(TokenKind.String, "Expected field name"); + + var field = ReadField(); + + jsonObject.Add(field.Key, field.Value); + } + + reader.Next(); // Read '}' (Object end) + + return jsonObject; + } + + + // TODO: Use ValueTuple in C#7 + private KeyValuePair ReadField() + { + var fieldName = reader.Current.Value; + + reader.Next(); // Read the field name + + reader.Ensure(TokenKind.Colon, "field"); + + reader.Next(); // Read ':' (Field value indicator) + + return new KeyValuePair(fieldName, ReadFieldValue()); + } + + + internal JsonArray ReadArray() + { + reader.Ensure(TokenKind.LeftBracket, "array"); + + var array = new XNodeArray(); + + reader.Next(); // Read the '[' (Array start) + + // Read the array's items + while (reader.Current.Kind != TokenKind.RightBracket) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read the ',' (Seperator) + } + + if (reader.Current.IsLiteral) + { + array.Add(ReadLiteral()); // Boolean, Date, Number, Null, String, Uri + } + else if (reader.Current.Kind == TokenKind.LeftBracket) + { + array.Add(ReadArray()); // Array + } + else if (reader.Current.Kind == TokenKind.LeftBrace) + { + array.Add(ReadObject()); // Object + } + else + { + throw new ParserException($"Expected comma, literal, or object. Was {reader.Current}."); + } + } + + reader.Next(); // Read the ']' (Array end) + + return array; + } + + #region IDisposable + + public void Dispose() + { + reader.Dispose(); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonToken.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonToken.cs new file mode 100644 index 000000000000..e0b2a78551fc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonToken.cs @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal enum TokenKind + { + LeftBrace, // { Object start + RightBrace, // } Object end + + LeftBracket, // [ Array start + RightBracket, // ] Array end + + Comma, // , Comma + Colon, // : Value indicator + Dot, // . Access field indicator + Terminator, // \0 Stream terminator + + Boolean = 31, // true or false + Null = 33, // null + Number = 34, // i.e. -1.93, -1, 0, 1, 1.1 + String = 35, // i.e. "text" + + Eof = 50 + } + + internal /* readonly */ struct JsonToken + { + internal static readonly JsonToken BraceOpen = new JsonToken(TokenKind.LeftBrace, "{"); + internal static readonly JsonToken BraceClose = new JsonToken(TokenKind.RightBrace, "}"); + + internal static readonly JsonToken BracketOpen = new JsonToken(TokenKind.LeftBracket, "["); + internal static readonly JsonToken BracketClose = new JsonToken(TokenKind.RightBracket, "]"); + + internal static readonly JsonToken Colon = new JsonToken(TokenKind.Colon, ":"); + internal static readonly JsonToken Comma = new JsonToken(TokenKind.Comma, ","); + internal static readonly JsonToken Terminator = new JsonToken(TokenKind.Terminator, "\0"); + + internal static readonly JsonToken True = new JsonToken(TokenKind.Boolean, "true"); + internal static readonly JsonToken False = new JsonToken(TokenKind.Boolean, "false"); + internal static readonly JsonToken Null = new JsonToken(TokenKind.Null, "null"); + + internal static readonly JsonToken Eof = new JsonToken(TokenKind.Eof, null); + + internal JsonToken(TokenKind kind, string value) + { + Kind = kind; + Value = value; + } + + internal readonly TokenKind Kind; + + internal readonly string Value; + + public override string ToString() => Kind + ": " + Value; + + #region Helpers + + internal bool IsLiteral => (byte)Kind > 30 && (byte)Kind < 40; + + internal bool IsTerminator => Kind == TokenKind.Terminator; + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonTokenizer.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonTokenizer.cs new file mode 100644 index 000000000000..e28e2ca0ec6f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/JsonTokenizer.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + using System.IO; + + + public class JsonTokenizer : IDisposable + { + private readonly StringBuilder sb = new StringBuilder(); + + private readonly SourceReader reader; + + internal JsonTokenizer(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonTokenizer(SourceReader reader) + { + this.reader = reader; + + reader.Next(); // Start with the first char + } + + internal JsonToken ReadNext() + { + reader.SkipWhitespace(); + + if (reader.IsEof) return JsonToken.Eof; + + switch (reader.Current) + { + case '"': return ReadQuotedString(); + + // Symbols + case '[' : reader.Next(); return JsonToken.BracketOpen; // Array start + case ']' : reader.Next(); return JsonToken.BracketClose; // Array end + case ',' : reader.Next(); return JsonToken.Comma; // Value seperator + case ':' : reader.Next(); return JsonToken.Colon; // Field value indicator + case '{' : reader.Next(); return JsonToken.BraceOpen; // Object start + case '}' : reader.Next(); return JsonToken.BraceClose; // Object end + case '\0' : reader.Next(); return JsonToken.Terminator; // Stream terminiator + + default: return ReadLiteral(); + } + } + + private JsonToken ReadQuotedString() + { + Expect('"', "quoted string indicator"); + + reader.Next(); // Read '"' (Starting quote) + + // Read until we reach an unescaped quote char + while (reader.Current != '"') + { + EnsureNotEof("quoted string"); + + if (reader.Current == '\\') + { + char escapedCharacter = reader.ReadEscapeCode(); + + sb.Append(escapedCharacter); + + continue; + } + + StoreCurrentCharacterAndReadNext(); + } + + reader.Next(); // Read '"' (Ending quote) + + return new JsonToken(TokenKind.String, value: sb.Extract()); + } + + private JsonToken ReadLiteral() + { + if (char.IsDigit(reader.Current) || + reader.Current == '-' || + reader.Current == '+') + { + return ReadNumber(); + } + + return ReadIdentifer(); + } + + private JsonToken ReadNumber() + { + // Read until we hit a non-numeric character + // -6.247737e-06 + // E + + while (char.IsDigit(reader.Current) + || reader.Current == '.' + || reader.Current == 'e' + || reader.Current == 'E' + || reader.Current == '-' + || reader.Current == '+') + { + StoreCurrentCharacterAndReadNext(); + } + + return new JsonToken(TokenKind.Number, value: sb.Extract()); + } + + int count = 0; + + private JsonToken ReadIdentifer() + { + count++; + + if (!char.IsLetter(reader.Current)) + { + throw new ParserException( + message : $"Expected literal (number, boolean, or null). Was '{reader.Current}'.", + location : reader.Location + ); + } + + // Read letters, numbers, and underscores '_' + while (char.IsLetterOrDigit(reader.Current) || reader.Current == '_') + { + StoreCurrentCharacterAndReadNext(); + } + + string text = sb.Extract(); + + switch (text) + { + case "true": return JsonToken.True; + case "false": return JsonToken.False; + case "null": return JsonToken.Null; + + default: return new JsonToken(TokenKind.String, text); + } + } + + private void Expect(char character, string description) + { + if (reader.Current != character) + { + throw new ParserException( + message: $"Expected {description} ('{character}'). Was '{reader.Current}'.", + location: reader.Location + ); + } + } + + private void EnsureNotEof(string tokenType) + { + if (reader.IsEof) + { + throw new ParserException( + message: $"Unexpected EOF while reading {tokenType}.", + location: reader.Location + ); + } + } + + private void StoreCurrentCharacterAndReadNext() + { + sb.Append(reader.Current); + + reader.Next(); + } + + public void Dispose() + { + reader.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Location.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Location.cs new file mode 100644 index 000000000000..ece53b8011ef --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Location.cs @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal struct SourceLocation + { + private int line; + private int column; + private int position; + + internal SourceLocation(int line = 0, int column = 0, int position = 0) + { + this.line = line; + this.column = column; + this.position = position; + } + + internal int Line => line; + + internal int Column => column; + + internal int Position => position; + + internal void Advance() + { + this.column++; + this.position++; + } + + internal void MarkNewLine() + { + this.line++; + this.column = 0; + } + + internal SourceLocation Clone() + { + return new SourceLocation(line, column, position); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Readers/SourceReader.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Readers/SourceReader.cs new file mode 100644 index 000000000000..a51791ecf716 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/Readers/SourceReader.cs @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Globalization; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public sealed class SourceReader : IDisposable + { + private readonly TextReader source; + + private char current; + + private readonly SourceLocation location = new SourceLocation(); + + private bool isEof = false; + + internal SourceReader(TextReader textReader) + { + this.source = textReader ?? throw new ArgumentNullException(nameof(textReader)); + } + + /// + /// Advances to the next character + /// + internal void Next() + { + // Advance to the new line when we see a new line '\n'. + // A new line may be prefixed by a carriage return '\r'. + + if (current == '\n') + { + location.MarkNewLine(); + } + + int charCode = source.Read(); // -1 for end + + if (charCode >= 0) + { + current = (char)charCode; + } + else + { + // If we've already marked this as the EOF, throw an exception + if (isEof) + { + throw new EndOfStreamException("Cannot advance past end of stream."); + } + + isEof = true; + + current = '\0'; + } + + location.Advance(); + } + + internal void SkipWhitespace() + { + while (char.IsWhiteSpace(current)) + { + Next(); + } + } + + internal char ReadEscapeCode() + { + Next(); + + char escapedChar = current; + + Next(); // Consume escaped character + + switch (escapedChar) + { + // Special escape codes + case '"': return '"'; // " (Quotation mark) U+0022 + case '/': return '/'; // / (Solidus) U+002F + case '\\': return '\\'; // \ (Reverse solidus) U+005C + + // Control Characters + case '0': return '\0'; // Nul (0) U+0000 + case 'a': return '\a'; // Alert (7) + case 'b': return '\b'; // Backspace (8) U+0008 + case 'f': return '\f'; // Form feed (12) U+000C + case 'n': return '\n'; // Line feed (10) U+000A + case 'r': return '\r'; // Carriage return (13) U+000D + case 't': return '\t'; // Horizontal tab (9) U+0009 + case 'v': return '\v'; // Vertical tab + + // Unicode escape sequence + case 'u': return ReadUnicodeEscapeSequence(); // U+XXXX + + default: throw new Exception($"Unrecognized escape sequence '\\{escapedChar}'"); + } + } + + private readonly char[] hexCode = new char[4]; + + private char ReadUnicodeEscapeSequence() + { + hexCode[0] = current; Next(); + hexCode[1] = current; Next(); + hexCode[2] = current; Next(); + hexCode[3] = current; Next(); + + return Convert.ToChar(int.Parse( + s : new string(hexCode), + style : NumberStyles.HexNumber, + provider: NumberFormatInfo.InvariantInfo + )); + } + + internal char Current => current; + + internal bool IsEof => isEof; + + internal char Peek() => (char)source.Peek(); + + internal SourceLocation Location => location; + + public void Dispose() + { + source.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Parser/TokenReader.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/TokenReader.cs new file mode 100644 index 000000000000..7af7e5a241ee --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Parser/TokenReader.cs @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + public class TokenReader : IDisposable + { + private readonly JsonTokenizer tokenizer; + private JsonToken current; + + internal TokenReader(JsonTokenizer tokenizer) + { + this.tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer)); + } + + internal void Next() + { + current = tokenizer.ReadNext(); + } + + internal JsonToken Current => current; + + internal void Ensure(TokenKind kind, string readerName) + { + if (current.Kind != kind) + { + throw new ParserException($"Expected {kind} while reading {readerName}). Was {current}."); + } + } + + public void Dispose() + { + tokenizer.Dispose(); + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/PipelineMocking.cs b/src/Oracle/Oracle.Autorest/generated/runtime/PipelineMocking.cs new file mode 100644 index 000000000000..3fa25192ccb3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/PipelineMocking.cs @@ -0,0 +1,262 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System.Threading.Tasks; + using System.Collections.Generic; + using System.Net.Http; + using System.Linq; + using System.Net; + using Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json; + + public enum MockMode + { + Live, + Record, + Playback, + + } + + public class PipelineMock + { + + private System.Collections.Generic.Stack scenario = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack context = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack description = new System.Collections.Generic.Stack(); + + private readonly string recordingPath; + private int counter = 0; + + public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync; + + public MockMode Mode { get; set; } = MockMode.Live; + public PipelineMock(string recordingPath) + { + this.recordingPath = recordingPath; + } + + public void PushContext(string text) => context.Push(text); + + public void PushDescription(string text) => description.Push(text); + + + public void PushScenario(string it) + { + // reset counter too + counter = 0; + + scenario.Push(it); + } + + public void PopContext() => context.Pop(); + + public void PopDescription() => description.Pop(); + + public void PopScenario() => scenario.Pop(); + + public void SetRecord() => Mode = MockMode.Record; + + public void SetPlayback() => Mode = MockMode.Playback; + + public void SetLive() => Mode = MockMode.Live; + + public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]"); + public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]"); + public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]"); + + /// + /// Headers that we substitute out blank values for in the recordings + /// Add additional headers as necessary + /// + public static HashSet Blacklist = new HashSet(System.StringComparer.CurrentCultureIgnoreCase) { + "Authorization", + }; + + public Dictionary ForceResponseHeaders = new Dictionary(); + + internal static XImmutableArray Removed = new XImmutableArray(new string[] { "[Filtered]" }); + + internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); + + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); + + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) + { + if (null == content || content.Length == 0) + { + return XNull.Instance; + } + var first = content[0]; + var last = content[content.Length - 1]; + + // plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS + if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"')) + { + return new JsonString(System.Text.Encoding.UTF8.GetString(content)); + } + + // base64 for everyone else + return new JsonString(System.Convert.ToBase64String(content)); + } + + internal static byte[] DeserializeContent(string content, bool isBase64) + { + if (string.IsNullOrWhiteSpace(content)) + { + return new byte[0]; + } + + if (isBase64) + { + try + { + return System.Convert.FromBase64String(content); + } + catch + { + // hmm. didn't work, return it as a string I guess. + } + } + return System.Text.Encoding.UTF8.GetBytes(content); + } + + public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) + { + var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; + messages[rqKey] = new JsonObject { + { "Request",new JsonObject { + { "Method", request.Method.Method }, + { "RequestUri", request.RequestUri }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, + { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, + { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} + } }, + {"Response", new JsonObject { + { "StatusCode", (int)response.StatusCode}, + { "Headers", new JsonObject(FilterHeaders(response.Headers))}, + { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, + }} + }; + System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); + } + + private JsonObject Load() + { + if (System.IO.File.Exists(this.recordingPath)) + { + try + { + return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath)); + } + catch + { + throw new System.Exception($"Invalid recording file: '{recordingPath}'"); + } + } + + throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath)); + } + + public HttpResponseMessage LoadMessage(string rqKey) + { + var responses = Load(); + var message = responses.Property(rqKey); + + if (null == message) + { + throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey)); + } + + var sc = 0; + var reqMessage = message.Property("Request"); + var respMessage = message.Property("Response"); + + // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); + var response = new HttpResponseMessage + { + StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) + }; + + foreach (var each in respMessage.Property("Headers")) + { + response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + foreach (var frh in ForceResponseHeaders) + { + response.Headers.Remove(frh.Key); + response.Headers.TryAddWithoutValidation(frh.Key, frh.Value); + } + + foreach (var each in respMessage.Property("ContentHeaders")) + { + response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); + response.RequestMessage = new HttpRequestMessage + { + Method = new HttpMethod(reqMessage.StringProperty("Method")), + RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) + }; + + foreach (var each in reqMessage.Property("Headers")) + { + response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + foreach (var each in reqMessage.Property("ContentHeaders")) + { + response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + return response; + } + + public async Task SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + counter++; + var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}"; + + switch (Mode) + { + case MockMode.Record: + //Add following code since the request.Content will be released after sendAsync + var requestClone = request; + if (requestClone.Content != null) + { + requestClone = await request.CloneWithContent(request.RequestUri, request.Method); + } + // make the call + var response = await next.SendAsync(request, callback); + + // save the message to the recording file + SaveMessage(rqkey, requestClone, response); + + // return the response. + return response; + + case MockMode.Playback: + // load and return the response. + return LoadMessage(rqkey); + + default: + // pass-thru, do nothing + return await next.SendAsync(request, callback); + } + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.Designer.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..6e6e5ac33816 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.Designer.cs @@ -0,0 +1,5655 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.generated.runtime.Properties +{ + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.PowerShell.Cmdlets.Oracle.generated.runtime.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized.. + /// + public static string AccessDeniedExceptionMessage + { + get + { + return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account id doesn't match one in subscription.. + /// + public static string AccountIdDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("AccountIdDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account needs to be specified. + /// + public static string AccountNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("AccountNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account "{0}" has been added.. + /// + public static string AddAccountAdded + { + get + { + return ResourceManager.GetString("AddAccountAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription.. + /// + public static string AddAccountChangeSubscription + { + get + { + return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential".. + /// + public static string AddAccountNonInteractiveGuestOrFpo + { + get + { + return ResourceManager.GetString("AddAccountNonInteractiveGuestOrFpo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription.. + /// + public static string AddAccountShowDefaultSubscription + { + get + { + return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription.. + /// + public static string AddAccountViewSubscriptions + { + get + { + return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is created successfully.. + /// + public static string AddOnCreatedMessage + { + get + { + return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on name {0} is already used.. + /// + public static string AddOnNameAlreadyUsed + { + get + { + return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} not found.. + /// + public static string AddOnNotFound + { + get + { + return ResourceManager.GetString("AddOnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on {0} is removed successfully.. + /// + public static string AddOnRemovedMessage + { + get + { + return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is updated successfully.. + /// + public static string AddOnUpdatedMessage + { + get + { + return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}.. + /// + public static string AddRoleMessageCreate + { + get + { + return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.. + /// + public static string AddRoleMessageCreateNode + { + get + { + return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure".. + /// + public static string AddRoleMessageCreatePHP + { + get + { + return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator. + /// + public static string AddRoleMessageInsufficientPermissions + { + get + { + return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A role name '{0}' already exists. + /// + public static string AddRoleMessageRoleExists + { + get + { + return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} already has an endpoint with name {1}. + /// + public static string AddTrafficManagerEndpointFailed + { + get + { + return ResourceManager.GetString("AddTrafficManagerEndpointFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. + ///Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable [rest of string was truncated]";. + /// + public static string ARMDataCollectionMessage + { + get + { + return ResourceManager.GetString("ARMDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Common.Authentication]: Authenticating for account {0} with single tenant {1}.. + /// + public static string AuthenticatingForSingleTenant + { + get + { + return ResourceManager.GetString("AuthenticatingForSingleTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell\. + /// + public static string AzureDirectory + { + get + { + return ResourceManager.GetString("AzureDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://manage.windowsazure.com. + /// + public static string AzurePortalUrl + { + get + { + return ResourceManager.GetString("AzurePortalUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PORTAL_URL. + /// + public static string AzurePortalUrlEnv + { + get + { + return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selected profile must not be null.. + /// + public static string AzureProfileMustNotBeNull + { + get + { + return ResourceManager.GetString("AzureProfileMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK\{0}\. + /// + public static string AzureSdkDirectory + { + get + { + return ResourceManager.GetString("AzureSdkDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscArchiveAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscArchiveAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find configuration data file: {0}. + /// + public static string AzureVMDscCannotFindConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscCannotFindConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Archive. + /// + public static string AzureVMDscCreateArchiveAction + { + get + { + return ResourceManager.GetString("AzureVMDscCreateArchiveAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration data must be a .psd1 file. + /// + public static string AzureVMDscInvalidConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscInvalidConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing configuration script: {0}. + /// + public static string AzureVMDscParsingConfiguration + { + get + { + return ResourceManager.GetString("AzureVMDscParsingConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscStorageBlobAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscStorageBlobAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload '{0}'. + /// + public static string AzureVMDscUploadToBlobStorageAction + { + get + { + return ResourceManager.GetString("AzureVMDscUploadToBlobStorageAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution failed because a background thread could not prompt the user.. + /// + public static string BaseShouldMethodFailureReason + { + get + { + return ResourceManager.GetString("BaseShouldMethodFailureReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base Uri was empty.. + /// + public static string BaseUriEmpty + { + get + { + return ResourceManager.GetString("BaseUriEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + public static string BeginProcessingWithoutParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + public static string BeginProcessingWithParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob with the name {0} already exists in the account.. + /// + public static string BlobAlreadyExistsInTheAccount + { + get + { + return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.core.windows.net/. + /// + public static string BlobEndpointUri + { + get + { + return ResourceManager.GetString("BlobEndpointUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE. + /// + public static string BlobEndpointUriEnv + { + get + { + return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is changing.. + /// + public static string BreakingChangeAttributeParameterChanging + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterChanging", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is becoming mandatory.. + /// + public static string BreakingChangeAttributeParameterMandatoryNow + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterMandatoryNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplaced + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplaced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by mandatory parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplacedMandatory + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplacedMandatory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of the parameter is changing from '{0}' to '{1}'.. + /// + public static string BreakingChangeAttributeParameterTypeChange + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterTypeChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change description : {0} + ///. + /// + public static string BreakingChangesAttributesChangeDescriptionMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesChangeDescriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' is replacing this cmdlet.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type is changing from the existing type :'{0}' to the new type :'{1}'. + /// + public static string BreakingChangesAttributesCmdLetOutputChange1 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "The output type '{0}' is changing". + /// + public static string BreakingChangesAttributesCmdLetOutputChange2 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///- The following properties are being added to the output type : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesAdded + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// - The following properties in the output type are being deprecated : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesRemoved + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type '{0}' is being deprecated without a replacement.. + /// + public static string BreakingChangesAttributesCmdLetOutputTypeDeprecated + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputTypeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - {0} + /// + ///. + /// + public static string BreakingChangesAttributesDeclarationMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Cmdlet : '{0}' + /// - {1} + ///. + /// + public static string BreakingChangesAttributesDeclarationMessageWithCmdletName + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessageWithCmdletName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NOTE : Go to {0} for steps to suppress (and other related information on) the breaking change messages.. + /// + public static string BreakingChangesAttributesFooterMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesFooterMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Breaking changes in the cmdlet '{0}' :. + /// + public static string BreakingChangesAttributesHeaderMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesHeaderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note : This change will take effect on '{0}' + ///. + /// + public static string BreakingChangesAttributesInEffectByDateMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByDateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ```powershell + ///# Old + ///{0} + /// + ///# New + ///{1} + ///``` + /// + ///. + /// + public static string BreakingChangesAttributesUsageChangeMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cmdlet invocation changes : + /// Old Way : {0} + /// New Way : {1}. + /// + public static string BreakingChangesAttributesUsageChangeMessageConsole + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessageConsole", resourceCulture); + } + } + + /// + /// The cmdlet is in experimental stage. The function may not be enabled in current subscription. + /// + public static string ExperimentalCmdletMessage + { + get + { + return ResourceManager.GetString("ExperimentalCmdletMessage", resourceCulture); + } + } + + + + /// + /// Looks up a localized string similar to CACHERUNTIMEURL. + /// + public static string CacheRuntimeUrl + { + get + { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cache. + /// + public static string CacheRuntimeValue + { + get + { + return ResourceManager.GetString("CacheRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CacheRuntimeVersion. + /// + public static string CacheRuntimeVersionKey + { + get + { + return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). + /// + public static string CacheVersionWarningText + { + get + { + return ResourceManager.GetString("CacheVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot change built-in environment {0}.. + /// + public static string CannotChangeBuiltinEnvironment + { + get + { + return ResourceManager.GetString("CannotChangeBuiltinEnvironment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find {0} with name {1}.. + /// + public static string CannotFind + { + get + { + return ResourceManager.GetString("CannotFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist. + /// + public static string CannotFindDeployment + { + get + { + return ResourceManager.GetString("CannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}. + /// + public static string CannotFindRole + { + get + { + return ResourceManager.GetString("CannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist. + /// + public static string CannotFindServiceConfigurationFile + { + get + { + return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.. + /// + public static string CannotFindServiceRoot + { + get + { + return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.. + /// + public static string CannotUpdateUnknownSubscription + { + get + { + return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ManagementCertificate. + /// + public static string CertificateElementName + { + get + { + return ResourceManager.GetString("CertificateElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to certificate.pfx. + /// + public static string CertificateFileName + { + get + { + return ResourceManager.GetString("CertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}. + /// + public static string CertificateImportedMessage + { + get + { + return ResourceManager.GetString("CertificateImportedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore + { + get + { + return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}. + /// + public static string CertificatePrivateKeyAccessError + { + get + { + return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1} deployment for {2} service. + /// + public static string ChangeDeploymentStateWaitMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud service {0} is in {1} state.. + /// + public static string ChangeDeploymentStatusCompleteMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed.. + /// + public static string ChangePublicEnvironmentMessage + { + get + { + return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} is set to value {1}. + /// + public static string ChangeSettingsElementMessage + { + get + { + return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing public environment is not supported.. + /// + public static string ChangingDefaultEnvironmentNotSupported + { + get + { + return ResourceManager.GetString("ChangingDefaultEnvironmentNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose which publish settings file to use:. + /// + public static string ChoosePublishSettingsFile + { + get + { + return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string ClientDiagnosticLevelName + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string ClientDiagnosticLevelValue + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cloud_package.cspkg. + /// + public static string CloudPackageFileName + { + get + { + return ResourceManager.GetString("CloudPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg. + /// + public static string CloudServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-ons for {0}. + /// + public static string CloudServiceDescription + { + get + { + return ResourceManager.GetString("CloudServiceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.. + /// + public static string CommunicationCouldNotBeEstablished + { + get + { + return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage + { + get + { + return ResourceManager.GetString("CompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationID : '{0}'. + /// + public static string ComputeCloudExceptionOperationIdMessage + { + get + { + return ResourceManager.GetString("ComputeCloudExceptionOperationIdMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to config.json. + /// + public static string ConfigurationFileName + { + get + { + return ResourceManager.GetString("ConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualMachine creation failed.. + /// + public static string CreateFailedErrorMessage + { + get + { + return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.. + /// + public static string CreateWebsiteFailed + { + get + { + return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core. + /// + public static string DataCacheClientsType + { + get + { + return ResourceManager.GetString("DataCacheClientsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}']. + /// + public static string DatacenterBlobQuery + { + get + { + return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure PowerShell Data Collection Confirmation. + /// + public static string DataCollectionActivity + { + get + { + return ResourceManager.GetString("DataCollectionActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose not to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmNo + { + get + { + return ResourceManager.GetString("DataCollectionConfirmNo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This confirmation message will be dismissed in '{0}' second(s).... + /// + public static string DataCollectionConfirmTime + { + get + { + return ResourceManager.GetString("DataCollectionConfirmTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmYes + { + get + { + return ResourceManager.GetString("DataCollectionConfirmYes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The setting profile has been saved to the following path '{0}'.. + /// + public static string DataCollectionSaveFileInformation + { + get + { + return ResourceManager.GetString("DataCollectionSaveFileInformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription. + /// + public static string DefaultAndCurrentSubscription + { + get + { + return ResourceManager.GetString("DefaultAndCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to none. + /// + public static string DefaultFileVersion + { + get + { + return ResourceManager.GetString("DefaultFileVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no hostnames which could be used for validation.. + /// + public static string DefaultHostnamesValidation + { + get + { + return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8080. + /// + public static string DefaultPort + { + get + { + return ResourceManager.GetString("DefaultPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string DefaultRoleCachingInMB + { + get + { + return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto. + /// + public static string DefaultUpgradeMode + { + get + { + return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 80. + /// + public static string DefaultWebPort + { + get + { + return ResourceManager.GetString("DefaultWebPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Delete + { + get + { + return ResourceManager.GetString("Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state. + /// + public static string DeploymentAlreadyInState + { + get + { + return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed. + /// + public static string DeploymentRemovedMessage + { + get + { + return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel. + /// + public static string DiagnosticLevelName + { + get + { + return ResourceManager.GetString("DiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string DiagnosticLevelValue + { + get + { + return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key to add already exists in the dictionary.. + /// + public static string DictionaryAddAlreadyContainsKey + { + get + { + return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array index cannot be less than zero.. + /// + public static string DictionaryCopyToArrayIndexLessThanZero + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements.. + /// + public static string DictionaryCopyToArrayTooShort + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided dns {0} doesn't exist. + /// + public static string DnsDoesNotExist + { + get + { + return ResourceManager.GetString("DnsDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure Certificate. + /// + public static string EnableRemoteDesktop_FriendlyCertificateName + { + get + { + return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint can't be retrieved for storage account. + /// + public static string EndPointNotFoundForBlobStorage + { + get + { + return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing.. + /// + public static string EndProcessingLog + { + get + { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet.. + /// + public static string EnvironmentDoesNotSupportActiveDirectory + { + get + { + return ResourceManager.GetString("EnvironmentDoesNotSupportActiveDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment '{0}' already exists.. + /// + public static string EnvironmentExists + { + get + { + return ResourceManager.GetString("EnvironmentExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name doesn't match one in subscription.. + /// + public static string EnvironmentNameDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("EnvironmentNameDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name needs to be specified.. + /// + public static string EnvironmentNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment needs to be specified.. + /// + public static string EnvironmentNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment name '{0}' is not found.. + /// + public static string EnvironmentNotFound + { + get + { + return ResourceManager.GetString("EnvironmentNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to environments.xml. + /// + public static string EnvironmentsFileName + { + get + { + return ResourceManager.GetString("EnvironmentsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VirtualMachine. + /// + public static string ErrorCreatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'. + /// + public static string ErrorRetrievingRuntimesForLocation + { + get + { + return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error updating VirtualMachine. + /// + public static string ErrorUpdatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}. + /// + public static string FailedJobErrorMessage + { + get + { + return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File path is not valid.. + /// + public static string FilePathIsNotValid + { + get + { + return ResourceManager.GetString("FilePathIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'.. + /// + public static string FirstPurchaseErrorMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.. + /// + public static string FirstPurchaseMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status:. + /// + public static string GatewayOperationStatus + { + get + { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\General. + /// + public static string GeneralScaffolding + { + get + { + return ResourceManager.GetString("GeneralScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes.... + /// + public static string GetAllAddOnsWaitMessage + { + get + { + return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key. + /// + public static string GetStorageKeysHeader + { + get + { + return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path.. + /// + public static string GitNotFound + { + get + { + return ResourceManager.GetString("GitNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound + { + get + { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg end element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoEndWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoEndWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WadCfg start element in the config is not matching the end element.. + /// + public static string IaasDiagnosticsBadConfigNoMatchingWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoMatchingWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode.dll. + /// + public static string IISNodeDll + { + get + { + return ResourceManager.GetString("IISNodeDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeEngineKey + { + get + { + return ResourceManager.GetString("IISNodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode-dev\\release\\x64. + /// + public static string IISNodePath + { + get + { + return ResourceManager.GetString("IISNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeRuntimeValue + { + get + { + return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}). + /// + public static string IISNodeVersionWarningText + { + get + { + return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath + { + get + { + return ResourceManager.GetString("IllegalPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. + /// + public static string InternalServerErrorMessage + { + get + { + return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}.. + /// + public static string InvalidCacheRoleName + { + get + { + return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate + { + get + { + return ResourceManager.GetString("InvalidCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format.. + /// + public static string InvalidCertificateSingle + { + get + { + return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist. + /// + public static string InvalidConfigPath + { + get + { + return ResourceManager.GetString("InvalidConfigPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.. + /// + public static string InvalidCountryNameMessage + { + get + { + return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.. + /// + public static string InvalidDefaultSubscription + { + get + { + return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment with {0} does not exist. + /// + public static string InvalidDeployment + { + get + { + return ResourceManager.GetString("InvalidDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".. + /// + public static string InvalidDeploymentSlot + { + get + { + return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}. + /// + public static string InvalidDnsName + { + get + { + return ResourceManager.GetString("InvalidDnsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service endpoint.. + /// + public static string InvalidEndpoint + { + get + { + return ResourceManager.GetString("InvalidEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file in {0} must be have {1} extension. + /// + public static string InvalidFileExtension + { + get + { + return ResourceManager.GetString("InvalidFileExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File {0} has invalid characters. + /// + public static string InvalidFileName + { + get + { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. On the left side open "Web Sites" + ///2. Click on any website + ///3. Choose "Setup Git Publishing" or "Reset deployment credentials" + ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}. + /// + public static string InvalidGitCredentials + { + get + { + return ResourceManager.GetString("InvalidGitCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID.. + /// + public static string InvalidGuid + { + get + { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site.. + /// + public static string InvalidHostnameValidation + { + get + { + return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20. + /// + public static string InvalidInstancesCount + { + get + { + return ResourceManager.GetString("InvalidInstancesCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.. + /// + public static string InvalidJobFile + { + get + { + return ResourceManager.GetString("InvalidJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again.. + /// + public static string InvalidManifestError + { + get + { + return ResourceManager.GetString("InvalidManifestError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name.. + /// + public static string InvalidMediaServicesAccount + { + get + { + return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules.. + /// + public static string InvalidNamespaceName + { + get + { + return ResourceManager.GetString("InvalidNamespaceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path must specify a valid path to an Azure profile.. + /// + public static string InvalidNewProfilePath + { + get + { + return ResourceManager.GetString("InvalidNewProfilePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'. + /// + public static string InvalidNullArgument + { + get + { + return ResourceManager.GetString("InvalidNullArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is invalid or empty. + /// + public static string InvalidOrEmptyArgumentMessage + { + get + { + return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided package path is invalid or doesn't exist. + /// + public static string InvalidPackagePath + { + get + { + return ResourceManager.GetString("InvalidPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid parameter set name.. + /// + public static string InvalidParameterSetName + { + get + { + return ResourceManager.GetString("InvalidParameterSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it. + /// + public static string InvalidPath + { + get + { + return ResourceManager.GetString("InvalidPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} has invalid characters. + /// + public static string InvalidPathName + { + get + { + return ResourceManager.GetString("InvalidPathName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token}. + /// + public static string InvalidProfileProperties + { + get + { + return ResourceManager.GetString("InvalidProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema + { + get + { + return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name "{0}" has invalid characters. + /// + public static string InvalidRoleNameMessage + { + get + { + return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid name for the service root folder is required. + /// + public static string InvalidRootNameMessage + { + get + { + return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a recognized runtime type. + /// + public static string InvalidRuntimeError + { + get + { + return ResourceManager.GetString("InvalidRuntimeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid language is required. + /// + public static string InvalidScaffoldingLanguageArg + { + get + { + return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription.. + /// + public static string InvalidSelectedSubscription + { + get + { + return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.. + /// + public static string InvalidServiceBusLocation + { + get + { + return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory.. + /// + public static string InvalidServiceName + { + get + { + return ResourceManager.GetString("InvalidServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement + { + get + { + return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to settings.json is invalid or doesn't exist. + /// + public static string InvalidServiceSettingMessage + { + get + { + return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.. + /// + public static string InvalidSubscription + { + get + { + return ResourceManager.GetString("InvalidSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription id {0} is not valid. + /// + public static string InvalidSubscriptionId + { + get + { + return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify a non-null subscription name.. + /// + public static string InvalidSubscriptionName + { + get + { + return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet. + /// + public static string InvalidSubscriptionNameMessage + { + get + { + return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content.. + /// + public static string InvalidSubscriptionsDataSchema + { + get + { + return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.. + /// + public static string InvalidVMSize + { + get + { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The web job file must have *.zip extension. + /// + public static string InvalidWebJobFile + { + get + { + return ResourceManager.GetString("InvalidWebJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Singleton option works for continuous jobs only.. + /// + public static string InvalidWebJobSingleton + { + get + { + return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name.. + /// + public static string InvalidWebsite + { + get + { + return ResourceManager.GetString("InvalidWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No job for id: {0} was found.. + /// + public static string JobNotFound + { + get + { + return ResourceManager.GetString("JobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to engines. + /// + public static string JsonEnginesSectionName + { + get + { + return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scaffolding for this language is not yet supported. + /// + public static string LanguageScaffoldingIsNotSupported + { + get + { + return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link already established. + /// + public static string LinkAlreadyEstablished + { + get + { + return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to local_package.csx. + /// + public static string LocalPackageFileName + { + get + { + return ResourceManager.GetString("LocalPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg. + /// + public static string LocalServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service.... + /// + public static string LookingForDeploymentMessage + { + get + { + return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for cloud service {0}.... + /// + public static string LookingForServiceMessage + { + get + { + return ResourceManager.GetString("LookingForServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Long-Running Job. + /// + public static string LROJobName + { + get + { + return ResourceManager.GetString("LROJobName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter.. + /// + public static string LROTaskExceptionMessage + { + get + { + return ResourceManager.GetString("LROTaskExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to managementCertificate.pem. + /// + public static string ManagementCertificateFileName + { + get + { + return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ?whr={0}. + /// + public static string ManagementPortalRealmFormat + { + get + { + return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //baseuri. + /// + public static string ManifestBaseUriQuery + { + get + { + return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to uri. + /// + public static string ManifestBlobUriKey + { + get + { + return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml. + /// + public static string ManifestUri + { + get + { + return ResourceManager.GetString("ManifestUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'.. + /// + public static string MissingCertificateInProfileProperties + { + get + { + return ResourceManager.GetString("MissingCertificateInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'.. + /// + public static string MissingPasswordInProfileProperties + { + get + { + return ResourceManager.GetString("MissingPasswordInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'SubscriptionId'.. + /// + public static string MissingSubscriptionInProfileProperties + { + get + { + return ResourceManager.GetString("MissingSubscriptionInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}. + /// + public static string MultipleAddOnsFoundMessage + { + get + { + return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.. + /// + public static string MultiplePublishingUsernames + { + get + { + return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name.. + /// + public static string MultiplePublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.NamedCaches. + /// + public static string NamedCacheSettingName + { + get + { + return ResourceManager.GetString("NamedCacheSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}. + /// + public static string NamedCacheSettingValue + { + get + { + return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername.. + /// + public static string NeedPublishingUsernames + { + get + { + return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Add-On Confirmation. + /// + public static string NewAddOnConformation + { + get + { + return ResourceManager.GetString("NewAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string NewMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.. + /// + public static string NewNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.. + /// + public static string NewNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service has been created at {0}. + /// + public static string NewServiceCreatedMessage + { + get + { + return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No + { + get + { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.. + /// + public static string NoCachedToken + { + get + { + return ResourceManager.GetString("NoCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.. + /// + public static string NoCacheWorkerRoles + { + get + { + return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No clouds available. + /// + public static string NoCloudsAvailable + { + get + { + return ResourceManager.GetString("NoCloudsAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "There is no current context, please log in using Connect-AzAccount.". + /// + public static string NoCurrentContextForDataCmdlet + { + get + { + return ResourceManager.GetString("NoCurrentContextForDataCmdlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeDirectory + { + get + { + return ResourceManager.GetString("NodeDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeEngineKey + { + get + { + return ResourceManager.GetString("NodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node.exe. + /// + public static string NodeExe + { + get + { + return ResourceManager.GetString("NodeExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>. + /// + public static string NoDefaultSubscriptionMessage + { + get + { + return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011. + /// + public static string NodeModulesPath + { + get + { + return ResourceManager.GetString("NodeModulesPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeProgramFilesFolderName + { + get + { + return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeRuntimeValue + { + get + { + return ResourceManager.GetString("NodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Node. + /// + public static string NodeScaffolding + { + get + { + return ResourceManager.GetString("NodeScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node. + /// + public static string NodeScaffoldingResources + { + get + { + return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}). + /// + public static string NodeVersionWarningText + { + get + { + return ResourceManager.GetString("NodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No, I do not agree. + /// + public static string NoHint + { + get + { + return ResourceManager.GetString("NoHint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection + { + get + { + return ResourceManager.GetString("NoInternetConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <NONE>. + /// + public static string None + { + get + { + return ResourceManager.GetString("None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}".. + /// + public static string NoPublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no subscription associated with account {0}.. + /// + public static string NoSubscriptionAddedMessage + { + get + { + return ResourceManager.GetString("NoSubscriptionAddedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount?. + /// + public static string NoSubscriptionFoundForTenant + { + get + { + return ResourceManager.GetString("NoSubscriptionFoundForTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.. + /// + public static string NotCacheWorkerRole + { + get + { + return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate can't be null.. + /// + public static string NullCertificateMessage + { + get + { + return ResourceManager.GetString("NullCertificateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} could not be null or empty. + /// + public static string NullObjectMessage + { + get + { + return ResourceManager.GetString("NullObjectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}. + /// + public static string NullRoleSettingsMessage + { + get + { + return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add new role to null service definition. + /// + public static string NullServiceDefinitionMessage + { + get + { + return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request offer '{0}' is not found.. + /// + public static string OfferNotFoundMessage + { + get + { + return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}. + /// + public static string OperationFailedErrorMessage + { + get + { + return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'. + /// + public static string OperationFailedMessage + { + get + { + return ResourceManager.GetString("OperationFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.. + /// + public static string OperationTimedOutOrError + { + get + { + return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package. + /// + public static string Package + { + get + { + return ResourceManager.GetString("Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package is created at service root path {0}.. + /// + public static string PackageCreated + { + get + { + return ResourceManager.GetString("PackageCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "*", + /// "iisnode": "*" + /// }} + /// + ///}} + ///. + /// + public static string PackageJsonDefaultFile + { + get + { + return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package.json. + /// + public static string PackageJsonFileName + { + get + { + return ResourceManager.GetString("PackageJsonFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} doesn't exist.. + /// + public static string PathDoesNotExist + { + get + { + return ResourceManager.GetString("PathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path for {0} doesn't exist in {1}.. + /// + public static string PathDoesNotExistForElement + { + get + { + return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Peer Asn has to be provided.. + /// + public static string PeerAsnRequired + { + get + { + return ResourceManager.GetString("PeerAsnRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 5.4.0. + /// + public static string PHPDefaultRuntimeVersion + { + get + { + return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to php. + /// + public static string PhpRuntimeValue + { + get + { + return ResourceManager.GetString("PhpRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\PHP. + /// + public static string PHPScaffolding + { + get + { + return ResourceManager.GetString("PHPScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP. + /// + public static string PHPScaffoldingResources + { + get + { + return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}). + /// + public static string PHPVersionWarningText + { + get + { + return ResourceManager.GetString("PHPVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. At the bottom of the page, click on New > Web Site > Quick Create + ///2. Type {0} in the URL field + ///3. Click on "Create Web Site" + ///4. Once the site has been created, click on the site name + ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.. + /// + public static string PortalInstructions + { + get + { + return ResourceManager.GetString("PortalInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git". + /// + public static string PortalInstructionsGit + { + get + { + return ResourceManager.GetString("PortalInstructionsGit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. + /// + public static string PreviewCmdletMessage + { + get + { + return ResourceManager.GetString("PreviewCmdletMessage", resourceCulture); + } + } + + + /// + /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided.. + /// + public static string PrimaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan.. + /// + public static string PromotionCodeWithCurrentPlanMessage + { + get + { + return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service not published at user request.. + /// + public static string PublishAbortedAtUserRequest + { + get + { + return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete.. + /// + public static string PublishCompleteMessage + { + get + { + return ResourceManager.GetString("PublishCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + public static string PublishConnectingMessage + { + get + { + return ResourceManager.GetString("PublishConnectingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Deployment ID: {0}.. + /// + public static string PublishCreatedDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created hosted service '{0}'.. + /// + public static string PublishCreatedServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Website URL: {0}.. + /// + public static string PublishCreatedWebsiteMessage + { + get + { + return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating.... + /// + public static string PublishCreatingServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initializing.... + /// + public static string PublishInitializingMessage + { + get + { + return ResourceManager.GetString("PublishInitializingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to busy. + /// + public static string PublishInstanceStatusBusy + { + get + { + return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to creating the virtual machine. + /// + public static string PublishInstanceStatusCreating + { + get + { + return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance {0} of role {1} is {2}.. + /// + public static string PublishInstanceStatusMessage + { + get + { + return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ready. + /// + public static string PublishInstanceStatusReady + { + get + { + return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}.... + /// + public static string PublishPreparingDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes.... + /// + public static string PublishServiceStartMessage + { + get + { + return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publish settings. + /// + public static string PublishSettings + { + get + { + return ResourceManager.GetString("PublishSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure. + /// + public static string PublishSettingsElementName + { + get + { + return ResourceManager.GetString("PublishSettingsElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .PublishSettings. + /// + public static string PublishSettingsFileExtention + { + get + { + return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publishSettings.xml. + /// + public static string PublishSettingsFileName + { + get + { + return ResourceManager.GetString("PublishSettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &whr={0}. + /// + public static string PublishSettingsFileRealmFormat + { + get + { + return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish settings imported. + /// + public static string PublishSettingsSetSuccessfully + { + get + { + return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL. + /// + public static string PublishSettingsUrlEnv + { + get + { + return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting.... + /// + public static string PublishStartingMessage + { + get + { + return ResourceManager.GetString("PublishStartingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading.... + /// + public static string PublishUpgradingMessage + { + get + { + return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading Package to storage service {0}.... + /// + public static string PublishUploadingPackageMessage + { + get + { + return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verifying storage account '{0}'.... + /// + public static string PublishVerifyingStorageMessage + { + get + { + return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionAdditionalContentPathNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionAdditionalContentPathNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration published to {0}. + /// + public static string PublishVMDscExtensionArchiveUploadedMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionArchiveUploadedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyFileVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyFileVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy the module '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyModuleVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyModuleVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1).. + /// + public static string PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleted '{0}'. + /// + public static string PublishVMDscExtensionDeletedFileMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeletedFileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot delete '{0}': {1}. + /// + public static string PublishVMDscExtensionDeleteErrorMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeleteErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionDirectoryNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDirectoryNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot get module for DscResource '{0}'. Possible solutions: + ///1) Specify -ModuleName for Import-DscResource in your configuration. + ///2) Unblock module that contains resource. + ///3) Move Import-DscResource inside Node block. + ///. + /// + public static string PublishVMDscExtensionGetDscResourceFailed + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionGetDscResourceFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to List of required modules: [{0}].. + /// + public static string PublishVMDscExtensionRequiredModulesVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredModulesVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version.. + /// + public static string PublishVMDscExtensionRequiredPsVersion + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredPsVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration script '{0}' contained parse errors: + ///{1}. + /// + public static string PublishVMDscExtensionStorageParserErrors + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionStorageParserErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Temp folder '{0}' created.. + /// + public static string PublishVMDscExtensionTempFolderVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionTempFolderVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip).. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration file '{0}' not found.. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. + ///Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enab [rest of string was truncated]";. + /// + public static string RDFEDataCollectionMessage + { + get + { + return ResourceManager.GetString("RDFEDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?. + /// + public static string RedeployCommit + { + get + { + return ResourceManager.GetString("RedeployCommit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate key?. + /// + public static string RegenerateKeyWarning + { + get + { + return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generate new key.. + /// + public static string RegenerateKeyWhatIfMessage + { + get + { + return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?. + /// + public static string RemoveAccountConfirmation + { + get + { + return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing account. + /// + public static string RemoveAccountMessage + { + get + { + return ResourceManager.GetString("RemoveAccountMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Add-On Confirmation. + /// + public static string RemoveAddOnConformation + { + get + { + return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.. + /// + public static string RemoveAddOnMessage + { + get + { + return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed.. + /// + public static string RemoveAzureBGPPeeringFailed + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Bgp Peering. + /// + public static string RemoveAzureBGPPeeringMessage + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}.. + /// + public static string RemoveAzureBGPPeeringSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?. + /// + public static string RemoveAzureBGPPeeringWarning + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?. + /// + public static string RemoveAzureDedicatdCircuitWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitLinkFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circui Link. + /// + public static string RemoveAzureDedicatedCircuitLinkMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}. + /// + public static string RemoveAzureDedicatedCircuitLinkSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?. + /// + public static string RemoveAzureDedicatedCircuitLinkWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit. + /// + public static string RemoveAzureDedicatedCircuitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}.. + /// + public static string RemoveAzureDedicatedCircuitSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cloud service {0}.... + /// + public static string RemoveAzureServiceWaitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription.. + /// + public static string RemoveDefaultSubscription + { + get + { + return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} deployment for {1} service. + /// + public static string RemoveDeploymentWaitMessage + { + get + { + return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?. + /// + public static string RemoveEnvironmentConfirmation + { + get + { + return ResourceManager.GetString("RemoveEnvironmentConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing environment. + /// + public static string RemoveEnvironmentMessage + { + get + { + return ResourceManager.GetString("RemoveEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job collection. + /// + public static string RemoveJobCollectionMessage + { + get + { + return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}". + /// + public static string RemoveJobCollectionWarning + { + get + { + return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job. + /// + public static string RemoveJobMessage + { + get + { + return ResourceManager.GetString("RemoveJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job "{0}". + /// + public static string RemoveJobWarning + { + get + { + return ResourceManager.GetString("RemoveJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the account?. + /// + public static string RemoveMediaAccountWarning + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account removed.. + /// + public static string RemoveMediaAccountWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.. + /// + public static string RemoveNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing old package {0}.... + /// + public static string RemovePackage + { + get + { + return ResourceManager.GetString("RemovePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?. + /// + public static string RemoveProfileConfirmation + { + get + { + return ResourceManager.GetString("RemoveProfileConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile. + /// + public static string RemoveProfileMessage + { + get + { + return ResourceManager.GetString("RemoveProfileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?. + /// + public static string RemoveServiceBusNamespaceConfirmation + { + get + { + return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove cloud service?. + /// + public static string RemoveServiceWarning + { + get + { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove cloud service and all it's deployments. + /// + public static string RemoveServiceWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?. + /// + public static string RemoveSubscriptionConfirmation + { + get + { + return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing subscription. + /// + public static string RemoveSubscriptionMessage + { + get + { + return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint {0} cannot be removed from profile {1} because it's not in the profile.. + /// + public static string RemoveTrafficManagerEndpointMissing + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerEndpointMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureTrafficManagerProfile Operation failed.. + /// + public static string RemoveTrafficManagerProfileFailed + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Traffic Manager profile with name {0}.. + /// + public static string RemoveTrafficManagerProfileSucceeded + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Traffic Manager profile "{0}"?. + /// + public static string RemoveTrafficManagerProfileWarning + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?. + /// + public static string RemoveVMConfirmationMessage + { + get + { + return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VM.. + /// + public static string RemoveVMMessage + { + get + { + return ResourceManager.GetString("RemoveVMMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing WebJob.... + /// + public static string RemoveWebJobMessage + { + get + { + return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?. + /// + public static string RemoveWebJobWarning + { + get + { + return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing website. + /// + public static string RemoveWebsiteMessage + { + get + { + return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the website "{0}". + /// + public static string RemoveWebsiteWarning + { + get + { + return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing public environment is not supported.. + /// + public static string RemovingDefaultEnvironmentsNotSupported + { + get + { + return ResourceManager.GetString("RemovingDefaultEnvironmentsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting namespace. + /// + public static string RemovingNamespaceMessage + { + get + { + return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name.. + /// + public static string RepositoryNotSetup + { + get + { + return ResourceManager.GetString("RepositoryNotSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.. + /// + public static string ReservedIPNameNoLongerInUseButStillBeingReserved + { + get + { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource with ID : {0} does not exist.. + /// + public static string ResourceNotFound + { + get + { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restart. + /// + public static string Restart + { + get + { + return ResourceManager.GetString("Restart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resume. + /// + public static string Resume + { + get + { + return ResourceManager.GetString("Resume", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /role:{0};"{1}/{0}" . + /// + public static string RoleArgTemplate + { + get + { + return ResourceManager.GetString("RoleArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bin. + /// + public static string RoleBinFolderName + { + get + { + return ResourceManager.GetString("RoleBinFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} is {1}. + /// + public static string RoleInstanceWaitMsg + { + get + { + return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20. + /// + public static string RoleMaxInstances + { + get + { + return ResourceManager.GetString("RoleMaxInstances", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to role name. + /// + public static string RoleName + { + get + { + return ResourceManager.GetString("RoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name {0} doesn't exist. + /// + public static string RoleNotFoundMessage + { + get + { + return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RoleSettings.xml. + /// + public static string RoleSettingsTemplateFileName + { + get + { + return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role type {0} doesn't exist. + /// + public static string RoleTypeDoesNotExist + { + get + { + return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }. + /// + public static string RuntimeDeploymentLocationError + { + get + { + return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'. + /// + public static string RuntimeDeploymentStart + { + get + { + return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?. + /// + public static string RuntimeMismatchWarning + { + get + { + return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEOVERRIDEURL. + /// + public static string RuntimeOverrideKey + { + get + { + return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime. + /// + public static string RuntimeQuery + { + get + { + return ResourceManager.GetString("RuntimeQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEID. + /// + public static string RuntimeTypeKey + { + get + { + return ResourceManager.GetString("RuntimeTypeKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEURL. + /// + public static string RuntimeUrlKey + { + get + { + return ResourceManager.GetString("RuntimeUrlKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY. + /// + public static string RuntimeVersionPrimaryKey + { + get + { + return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to scaffold.xml. + /// + public static string ScaffoldXml + { + get + { + return ResourceManager.GetString("ScaffoldXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation. + /// + public static string SchedulerInvalidLocation + { + get + { + return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided.. + /// + public static string SecondaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} already exists on disk in location {1}. + /// + public static string ServiceAlreadyExistsOnDisk + { + get + { + return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found. + /// + public static string ServiceBusAuthorizationRuleNotFound + { + get + { + return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service bus entity '{0}' is not found.. + /// + public static string ServiceBusEntityTypeNotFound + { + get + { + return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace. + /// + public static string ServiceBusNamespaceMissingMessage + { + get + { + return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service configuration. + /// + public static string ServiceConfiguration + { + get + { + return ResourceManager.GetString("ServiceConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service definition. + /// + public static string ServiceDefinition + { + get + { + return ResourceManager.GetString("ServiceDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName + { + get + { + return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Deploy. + /// + public static string ServiceDeploymentName + { + get + { + return ResourceManager.GetString("ServiceDeploymentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud service "{0}" does not exist.. + /// + public static string ServiceDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status. + /// + public static string ServiceIsInTransitionState + { + get + { + return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.". + /// + public static string ServiceManagementClientExceptionStringFormat + { + get + { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service name. + /// + public static string ServiceName + { + get + { + return ResourceManager.GetString("ServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists + { + get + { + return ResourceManager.GetString("ServiceNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide name for the hosted service. + /// + public static string ServiceNameMissingMessage + { + get + { + return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service parent directory. + /// + public static string ServiceParentDirectory + { + get + { + return ResourceManager.GetString("ServiceParentDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} removed successfully. + /// + public static string ServiceRemovedMessage + { + get + { + return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service directory. + /// + public static string ServiceRoot + { + get + { + return ResourceManager.GetString("ServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings + { + get + { + return ResourceManager.GetString("ServiceSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName + { + get + { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist.. + /// + public static string ServiceSlotDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is {2}. + /// + public static string ServiceStatusChanged + { + get + { + return ResourceManager.GetString("ServiceStatusChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Add-On Confirmation. + /// + public static string SetAddOnConformation + { + get + { + return ResourceManager.GetString("SetAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} does not contain endpoint {1}. Adding it.. + /// + public static string SetInexistentTrafficManagerEndpointMessage + { + get + { + return ResourceManager.GetString("SetInexistentTrafficManagerEndpointMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string SetMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.. + /// + public static string SetNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances are set to {1}. + /// + public static string SetRoleInstancesMessage + { + get + { + return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}. + /// + public static string SettingsFileEmptyContent + { + get + { + return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName + { + get + { + return ResourceManager.GetString("SettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient parameters passed to create a new endpoint.. + /// + public static string SetTrafficManagerEndpointNeedsParameters + { + get + { + return ResourceManager.GetString("SetTrafficManagerEndpointNeedsParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ambiguous operation: the profile name specified doesn't match the name of the profile object.. + /// + public static string SetTrafficManagerProfileAmbiguous + { + get + { + return ResourceManager.GetString("SetTrafficManagerProfileAmbiguous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts.. + /// + public static string ShouldContinueFail + { + get + { + return ResourceManager.GetString("ShouldContinueFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption + { + get + { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailConfirm + { + get + { + return ResourceManager.GetString("ShouldProcessFailConfirm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again.. + /// + public static string ShouldProcessFailImpact + { + get + { + return ResourceManager.GetString("ShouldProcessFailImpact", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailWhatIf + { + get + { + return ResourceManager.GetString("ShouldProcessFailWhatIf", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown. + /// + public static string Shutdown + { + get + { + return ResourceManager.GetString("Shutdown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" . + /// + public static string SitesArgTemplate + { + get + { + return ResourceManager.GetString("SitesArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string StandardRetryDelayInMs + { + get + { + return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string Start + { + get + { + return ResourceManager.GetString("Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string StartedEmulator + { + get + { + return ResourceManager.GetString("StartedEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Emulator.... + /// + public static string StartingEmulator + { + get + { + return ResourceManager.GetString("StartingEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to start. + /// + public static string StartStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop. + /// + public static string Stop + { + get + { + return ResourceManager.GetString("Stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping emulator.... + /// + public static string StopEmulatorMessage + { + get + { + return ResourceManager.GetString("StopEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string StoppedEmulatorMessage + { + get + { + return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to stop. + /// + public static string StopStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Name:. + /// + public static string StorageAccountName + { + get + { + return ResourceManager.GetString("StorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account.. + /// + public static string StorageAccountNotFound + { + get + { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AzureStorageEmulator.exe. + /// + public static string StorageEmulatorExe + { + get + { + return ResourceManager.GetString("StorageEmulatorExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string StorageEmulatorInstallPathRegistryKeyValue + { + get + { + return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator. + /// + public static string StorageEmulatorRegistryKey + { + get + { + return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary Key:. + /// + public static string StoragePrimaryKey + { + get + { + return ResourceManager.GetString("StoragePrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secondary Key:. + /// + public static string StorageSecondaryKey + { + get + { + return ResourceManager.GetString("StorageSecondaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} already exists.. + /// + public static string SubscriptionAlreadyExists + { + get + { + return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information.. + /// + public static string SubscriptionDataFileDeprecated + { + get + { + return ResourceManager.GetString("SubscriptionDataFileDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultSubscriptionData.xml. + /// + public static string SubscriptionDataFileName + { + get + { + return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription data file {0} does not exist.. + /// + public static string SubscriptionDataFileNotFound + { + get + { + return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription id {0} doesn't exist.. + /// + public static string SubscriptionIdNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription must not be null. + /// + public static string SubscriptionMustNotBeNull + { + get + { + return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription name needs to be specified.. + /// + public static string SubscriptionNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription name {0} doesn't exist.. + /// + public static string SubscriptionNameNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionNameNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription needs to be specified.. + /// + public static string SubscriptionNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspend. + /// + public static string Suspend + { + get + { + return ResourceManager.GetString("Suspend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Swapping website production slot .... + /// + public static string SwappingWebsite + { + get + { + return ResourceManager.GetString("SwappingWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' production slot with slot '{1}'?. + /// + public static string SwapWebsiteSlotWarning + { + get + { + return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Switch-AzureMode cmdlet is deprecated and will be removed in a future release.. + /// + public static string SwitchAzureModeDeprecated + { + get + { + return ResourceManager.GetString("SwitchAzureModeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}'. + /// + public static string TraceBeginLROJob + { + get + { + return ResourceManager.GetString("TraceBeginLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}'. + /// + public static string TraceBlockLROThread + { + get + { + return ResourceManager.GetString("TraceBlockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Completing cmdlet execution in RunJob. + /// + public static string TraceEndLROJob + { + get + { + return ResourceManager.GetString("TraceEndLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}'. + /// + public static string TraceHandleLROStateChange + { + get + { + return ResourceManager.GetString("TraceHandleLROStateChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job due to stoppage or failure. + /// + public static string TraceHandlerCancelJob + { + get + { + return ResourceManager.GetString("TraceHandlerCancelJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job that was previously blocked.. + /// + public static string TraceHandlerUnblockJob + { + get + { + return ResourceManager.GetString("TraceHandlerUnblockJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Error in cmdlet execution. + /// + public static string TraceLROJobException + { + get + { + return ResourceManager.GetString("TraceLROJobException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Removing state changed event handler, exception '{0}'. + /// + public static string TraceRemoveLROEventHandler + { + get + { + return ResourceManager.GetString("TraceRemoveLROEventHandler", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: ShouldMethod '{0}' unblocked.. + /// + public static string TraceUnblockLROThread + { + get + { + return ResourceManager.GetString("TraceUnblockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.. + /// + public static string UnableToDecodeBase64String + { + get + { + return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}.. + /// + public static string UnableToPatchJson + { + get + { + return ResourceManager.GetString("UnableToPatchJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provider {0} is unknown.. + /// + public static string UnknownProviderMessage + { + get + { + return ResourceManager.GetString("UnknownProviderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string Update + { + get + { + return ResourceManager.GetString("Update", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'.. + /// + public static string UpdatedSettings + { + get + { + return ResourceManager.GetString("UpdatedSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name is not valid.. + /// + public static string UserNameIsNotValid + { + get + { + return ResourceManager.GetString("UserNameIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name needs to be specified.. + /// + public static string UserNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("UserNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the VLan Id has to be provided.. + /// + public static string VlanIdRequired + { + get + { + return ResourceManager.GetString("VlanIdRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitMessage + { + get + { + return ResourceManager.GetString("WaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching.... + /// + public static string WarningWhenStorageEmulatorIsMissing + { + get + { + return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Web.cloud.config. + /// + public static string WebCloudConfig + { + get + { + return ResourceManager.GetString("WebCloudConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to web.config. + /// + public static string WebConfigTemplateFileName + { + get + { + return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSDeploy. + /// + public static string WebDeployKeywordInWebSitePublishProfile + { + get + { + return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}.. + /// + public static string WebProjectBuildFailTemplate + { + get + { + return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole. + /// + public static string WebRole + { + get + { + return ResourceManager.GetString("WebRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_web.cmd > log.txt. + /// + public static string WebRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole.xml. + /// + public static string WebRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace.. + /// + public static string WebsiteAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location.. + /// + public static string WebsiteAlreadyExistsReplacement + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Site {0} already has repository created for it.. + /// + public static string WebsiteRepositoryAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/. + /// + public static string WebsiteSufixUrl + { + get + { + return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}. + /// + public static string WebSiteWebDeployUriTemplate + { + get + { + return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole. + /// + public static string WorkerRole + { + get + { + return ResourceManager.GetString("WorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_worker.cmd > log.txt. + /// + public static string WorkerRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole.xml. + /// + public static string WorkerRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (x86). + /// + public static string x86InProgramFiles + { + get + { + return ResourceManager.GetString("x86InProgramFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes + { + get + { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes, I agree. + /// + public static string YesHint + { + get + { + return ResourceManager.GetString("YesHint", resourceCulture); + } + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.resx b/src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.resx new file mode 100644 index 000000000000..a08a2e50172b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Properties/Resources.resx @@ -0,0 +1,1747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The remote server returned an error: (401) Unauthorized. + + + Account "{0}" has been added. + + + To switch to a different subscription, please use Select-AzureSubscription. + + + Subscription "{0}" is selected as the default subscription. + + + To view all the subscriptions, please use Get-AzureSubscription. + + + Add-On {0} is created successfully. + + + Add-on name {0} is already used. + + + Add-On {0} not found. + + + Add-on {0} is removed successfully. + + + Add-On {0} is updated successfully. + + + Role has been created at {0}\{1}. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure". + + + Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator + + + A role name '{0}' already exists + + + Windows Azure Powershell\ + + + https://manage.windowsazure.com + + + AZURE_PORTAL_URL + + + Azure SDK\{0}\ + + + Base Uri was empty. + WAPackIaaS + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob with the name {0} already exists in the account. + + + https://{0}.blob.core.windows.net/ + + + AZURE_BLOBSTORAGE_TEMPLATE + + + CACHERUNTIMEURL + + + cache + + + CacheRuntimeVersion + + + Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) + + + Cannot find {0} with name {1}. + + + Deployment for service {0} with {1} slot doesn't exist + + + Can't find valid Microsoft Azure role in current directory {0} + + + service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist + + + Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders. + + + The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated. + + + ManagementCertificate + + + certificate.pfx + + + Certificate imported into CurrentUser\My\{0} + + + Your account does not have access to the private key for certificate {0} + + + {0} {1} deployment for {2} service + + + Cloud service {0} is in {1} state. + + + Changing/Removing public environment '{0}' is not allowed. + + + Service {0} is set to value {1} + + + Choose which publish settings file to use: + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + 1 + + + cloud_package.cspkg + + + ServiceConfiguration.Cloud.cscfg + + + Add-ons for {0} + + + Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive. + + + Complete + + + config.json + + + VirtualMachine creation failed. + WAPackIaaS + + + Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead. + + + Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core + + + //blobcontainer[@datacenter='{0}'] + + + Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription + + + none + + + There are no hostnames which could be used for validation. + + + 8080 + + + 1000 + + + Auto + + + 80 + + + Delete + WAPackIaaS + + + The {0} slot for service {1} is already in {2} state + + + The deployment in {0} slot for service {1} is removed + + + Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel + + + 1 + + + The key to add already exists in the dictionary. + + + The array index cannot be less than zero. + + + The supplied array does not have enough room to contain the copied elements. + + + The provided dns {0} doesn't exist + + + Microsoft Azure Certificate + + + Endpoint can't be retrieved for storage account + + + {0} end processing. + + + To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet. + + + The environment '{0}' already exists. + + + environments.xml + + + Error creating VirtualMachine + WAPackIaaS + + + Unable to download available runtimes for location '{0}' + + + Error updating VirtualMachine + WAPackIaaS + + + Job Id {0} failed. Error: {1}, ExceptionDetails: {2} + WAPackIaaS + + + The HTTP request was forbidden with client authentication scheme 'Anonymous'. + + + This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell. + + + Operation Status: + + + Resources\Scaffolding\General + + + Getting all available Microsoft Azure Add-Ons, this may take few minutes... + + + Name{0}Primary Key{0}Seconday Key + + + Git not found. Please install git and place it in your command line path. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + iisnode.dll + + + iisnode + + + iisnode-dev\\release\\x64 + + + iisnode + + + Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}) + + + Internal Server Error + + + Cannot enable memcach protocol on a cache worker role {0}. + + + Invalid certificate format. + + + The provided configuration path is invalid or doesn't exist + + + The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2. + + + Deployment with {0} does not exist + + + The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production". + + + Invalid service endpoint. + + + File {0} has invalid characters + + + You must create your git publishing credentials using the Microsoft Azure portal. +Please follow these steps in the portal: +1. On the left side open "Web Sites" +2. Click on any website +3. Choose "Setup Git Publishing" or "Reset deployment credentials" +4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username} + + + The value {0} provided is not a valid GUID. Please provide a valid GUID. + + + The specified hostname does not exist. Please specify a valid hostname for the site. + + + Role {0} instances must be greater than or equal 0 and less than or equal 20 + + + There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file. + + + Could not download a valid runtime manifest, Please check your internet connection and try again. + + + The account {0} was not found. Please specify a valid account name. + + + The provided name "{0}" does not match the service bus namespace naming rules. + + + Value cannot be null. Parameter name: '{0}' + + + The provided package path is invalid or doesn't exist + + + '{0}' is an invalid parameter set name. + + + {0} doesn't exist in {1} or you've not passed valid value for it + + + Path {0} has invalid characters + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided role name "{0}" has invalid characters + + + A valid name for the service root folder is required + + + {0} is not a recognized runtime type + + + A valid language is required + + + No subscription is currently selected. Use Select-Subscription to activate a subscription. + + + The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations. + + + Please provide a service name or run this command from inside a service project directory. + + + You must provide valid value for {0} + + + settings.json is invalid or doesn't exist + + + The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data. + + + The provided subscription id {0} is not valid + + + A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet + + + The provided subscriptions file {0} has invalid content. + + + Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge. + + + The web job file must have *.zip extension + + + Singleton option works for continuous jobs only. + + + The website {0} was not found. Please specify a valid website name. + + + No job for id: {0} was found. + WAPackIaaS + + + engines + + + Scaffolding for this language is not yet supported + + + Link already established + + + local_package.csx + + + ServiceConfiguration.Local.cscfg + + + Looking for {0} deployment for {1} cloud service... + + + Looking for cloud service {0}... + + + managementCertificate.pem + + + ?whr={0} + + + //baseuri + + + uri + + + http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml + + + Multiple Add-Ons found holding name {0} + + + Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername. + + + The first publish settings file "{0}" is used. If you want to use another file specify the file name. + + + Microsoft.WindowsAzure.Plugins.Caching.NamedCaches + + + {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]} + + + A publishing username is required. Please specify one using the argument PublishingUsername. + + + New Add-On Confirmation + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names. + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at {0} and (c) agree to sharing my contact information with {2}. + + + Service has been created at {0} + + + No + + + There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription. + + + The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole. + + + No clouds available + WAPackIaaS + + + nodejs + + + node + + + node.exe + + + There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name> + + + Microsoft SDKs\Azure\Nodejs\Nov2011 + + + nodejs + + + node + + + Resources\Scaffolding\Node + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node + + + Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}) + + + No, I do not agree + + + No publish settings files with extension *.publishsettings are found in the directory "{0}". + + + '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration. + + + Certificate can't be null. + + + {0} could not be null or empty + + + Unable to add a null RoleSettings to {0} + + + Unable to add new role to null service definition + + + The request offer '{0}' is not found. + + + Operation "{0}" failed on VM with ID: {1} + WAPackIaaS + + + The REST operation failed with message '{0}' and error code '{1}' + + + Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state. + WAPackIaaS + + + package + + + Package is created at service root path {0}. + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "*", + "iisnode": "*" + }} + +}} + + + + package.json + + + A value for the Peer Asn has to be provided. + + + 5.4.0 + + + php + + + Resources\Scaffolding\PHP + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP + + + Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}) + + + You must create your first web site using the Microsoft Azure portal. +Please follow these steps in the portal: +1. At the bottom of the page, click on New > Web Site > Quick Create +2. Type {0} in the URL field +3. Click on "Create Web Site" +4. Once the site has been created, click on the site name +5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create. + + + 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git" + + + A value for the Primary Peer Subnet has to be provided. + + + Promotion code can be used only when updating to a new plan. + + + Service not published at user request. + + + Complete. + + + Connecting... + + + Created Deployment ID: {0}. + + + Created hosted service '{0}'. + + + Created Website URL: {0}. + + + Creating... + + + Initializing... + + + busy + + + creating the virtual machine + + + Instance {0} of role {1} is {2}. + + + ready + + + Preparing deployment for {0} with Subscription ID: {1}... + + + Publishing {0} to Microsoft Azure. This may take several minutes... + + + publish settings + + + Azure + + + .PublishSettings + + + publishSettings.xml + + + Publish settings imported + + + AZURE_PUBLISHINGPROFILE_URL + + + Starting... + + + Upgrading... + + + Uploading Package to storage service {0}... + + + Verifying storage account '{0}'... + + + Replace current deployment with '{0}' Id ? + + + Are you sure you want to regenerate key? + + + Generate new key. + + + Are you sure you want to remove account '{0}'? + + + Removing account + + + Remove Add-On Confirmation + + + If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm. + + + Remove-AzureBGPPeering Operation failed. + + + Removing Bgp Peering + + + Successfully removed Azure Bgp Peering with Service Key {0}. + + + Are you sure you want to remove the Bgp Peering with service key '{0}'? + + + Are you sure you want to remove the Dedicated Circuit with service key '{0}'? + + + Remove-AzureDedicatedCircuit Operation failed. + + + Remove-AzureDedicatedCircuitLink Operation failed. + + + Removing Dedicated Circui Link + + + Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1} + + + Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'? + + + Removing Dedicated Circuit + + + Successfully removed Azure Dedicated Circuit with Service Key {0}. + + + Removing cloud service {0}... + + + Removing {0} deployment for {1} service + + + Removing job collection + + + Are you sure you want to remove the job collection "{0}" + + + Removing job + + + Are you sure you want to remove the job "{0}" + + + Are you sure you want to remove the account? + + + Account removed. + + + Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription. + + + Removing old package {0}... + + + Are you sure you want to delete the namespace '{0}'? + + + Are you sure you want to remove cloud service? + + + Remove cloud service and all it's deployments + + + Are you sure you want to remove subscription '{0}'? + + + Removing subscription + + + Are you sure you want to delete the VM '{0}'? + + + Deleting VM. + + + Removing WebJob... + + + Are you sure you want to remove job '{0}'? + + + Removing website + + + Are you sure you want to remove the website "{0}" + + + Deleting namespace + + + Repository is not setup. You need to pass a valid site name. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use. + + + Resource with ID : {0} does not exist. + WAPackIaaS + + + Restart + WAPackIaaS + + + Resume + WAPackIaaS + + + /role:{0};"{1}/{0}" + + + bin + + + Role {0} is {1} + + + 20 + + + role name + + + The provided role name {0} doesn't exist + + + RoleSettings.xml + + + Role type {0} doesn't exist + + + public static Dictionary<string, Location> ReverseLocations { get; private set; } + + + Preparing runtime deployment for service '{0}' + + + WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version? + + + RUNTIMEOVERRIDEURL + + + /runtimemanifest/runtimes/runtime + + + RUNTIMEID + + + RUNTIMEURL + + + RUNTIMEVERSIONPRIMARYKEY + + + scaffold.xml + + + Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation + + + A value for the Secondary Peer Subnet has to be provided. + + + Service {0} already exists on disk in location {1} + + + No ServiceBus authorization rule with the given characteristics was found + + + The service bus entity '{0}' is not found. + + + Internal Server Error. This could happen due to an incorrect/missing namespace + + + service configuration + + + service definition + + + ServiceDefinition.csdef + + + {0}Deploy + + + The specified cloud service "{0}" does not exist. + + + {0} slot for service {1} is in {2} state, please wait until it finish and update it's status + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Begin Operation: {0} + + + Completed Operation: {0} + + + service name + + + Please provide name for the hosted service + + + service parent directory + + + Service {0} removed successfully + + + service directory + + + service settings + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + The {0} slot for cloud service {1} doesn't exist. + + + {0} slot for service {1} is {2} + + + Set Add-On Confirmation + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at <url> and (c) agree to sharing my contact information with {2}. + + + Role {0} instances are set to {1} + + + {"Slot":"","Location":"","Subscription":"","StorageAccountName":""} + + + deploymentSettings.json + + + Confirm + + + Shutdown + WAPackIaaS + + + /sites:{0};{1};"{2}/{0}" + + + 1000 + + + Start + WAPackIaaS + + + Started + + + Starting Emulator... + + + start + + + Stop + WAPackIaaS + + + Stopping emulator... + + + Stopped + + + stop + + + Account Name: + + + Cannot find storage account '{0}' please type the name of an existing storage account. + + + AzureStorageEmulator.exe + + + InstallPath + + + SOFTWARE\Microsoft\Windows Azure Storage Emulator + + + Primary Key: + + + Secondary Key: + + + The subscription named {0} already exists. + + + DefaultSubscriptionData.xml + + + The subscription data file {0} does not exist. + + + Subscription must not be null + WAPackIaaS + + + Suspend + WAPackIaaS + + + Swapping website production slot ... + + + Are you sure you want to swap the website '{0}' production slot with slot '{1}'? + + + The provider {0} is unknown. + + + Update + WAPackIaaS + + + Updated settings for subscription '{0}'. Current subscription is '{1}'. + + + A value for the VLan Id has to be provided. + + + Please wait... + + + The azure storage emulator is not installed, skip launching... + + + Web.cloud.config + + + web.config + + + MSDeploy + + + Cannot build the project successfully. Please see logs in {0}. + + + WebRole + + + setup_web.cmd > log.txt + + + WebRole.xml + + + WebSite with given name {0} already exists in the specified Subscription and Webspace. + + + WebSite with given name {0} already exists in the specified Subscription and Location. + + + Site {0} already has repository created for it. + + + Workspaces/WebsiteExtension/Website/{0}/dashboard/ + + + https://{0}/msdeploy.axd?site={1} + + + WorkerRole + + + setup_worker.cmd > log.txt + + + WorkerRole.xml + + + Yes + + + Yes, I agree + + + Remove-AzureTrafficManagerProfile Operation failed. + + + Successfully removed Traffic Manager profile with name {0}. + + + Are you sure you want to remove the Traffic Manager profile "{0}"? + + + Profile {0} already has an endpoint with name {1} + + + Profile {0} does not contain endpoint {1}. Adding it. + + + The endpoint {0} cannot be removed from profile {1} because it's not in the profile. + + + Insufficient parameters passed to create a new endpoint. + + + Ambiguous operation: the profile name specified doesn't match the name of the profile object. + + + <NONE> + + + "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}." + {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID. + + + Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}. + {0} is the string that is not in a valid base 64 format. + + + Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential". + + + Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'? + + + Removing environment + + + There is no subscription associated with account {0}. + + + Account id doesn't match one in subscription. + + + Environment name doesn't match one in subscription. + + + Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile? + + + Removing the Azure profile + + + The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information. + + + Account needs to be specified + + + No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription. + + + Path must specify a valid path to an Azure profile. + + + Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token} + + + Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'. + + + Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'. + + + Property bag Hashtable must contain a 'SubscriptionId'. + + + Selected profile must not be null. + + + The Switch-AzureMode cmdlet is deprecated and will be removed in a future release. + + + OperationID : '{0}' + + + Cannot get module for DscResource '{0}'. Possible solutions: +1) Specify -ModuleName for Import-DscResource in your configuration. +2) Unblock module that contains resource. +3) Move Import-DscResource inside Node block. + + 0 = name of DscResource + + + Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version. + {0} = minimal required PS version, {1} = current PS version + + + Parsing configuration script: {0} + {0} is the path to a script file + + + Configuration script '{0}' contained parse errors: +{1} + 0 = path to the configuration script, 1 = parser errors + + + List of required modules: [{0}]. + {0} = list of modules + + + Temp folder '{0}' created. + {0} = temp folder path + + + Copy '{0}' to '{1}'. + {0} = source, {1} = destination + + + Copy the module '{0}' to '{1}'. + {0} = source, {1} = destination + + + File '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the path to a file + + + Configuration file '{0}' not found. + 0 = path to the configuration file + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip). + 0 = path to the configuration file + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1). + 0 = path to the configuration file + + + Create Archive + + + Upload '{0}' + {0} is the name of an storage blob + + + Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the name of an storage blob + + + Configuration published to {0} + {0} is an URI + + + Deleted '{0}' + {0} is the path of a file + + + Cannot delete '{0}': {1} + {0} is the path of a file, {1} is an error message + + + Cannot find the WadCfg end element in the config. + + + WadCfg start element in the config is not matching the end element. + + + Cannot find the WadCfg element in the config. + + + Cannot find configuration data file: {0} + + + The configuration data must be a .psd1 file + + + Cannot change built-in environment {0}. + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. +Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable data collection: PS > Enable-AzDataCollection. + + + Microsoft Azure PowerShell Data Collection Confirmation + + + You choose not to participate in Microsoft Azure PowerShell data collection. + + + This confirmation message will be dismissed in '{0}' second(s)... + + + You choose to participate in Microsoft Azure PowerShell data collection. + + + The setting profile has been saved to the following path '{0}'. + + + [Common.Authentication]: Authenticating for account {0} with single tenant {1}. + + + Changing public environment is not supported. + + + Environment name needs to be specified. + + + Environment needs to be specified. + + + The environment name '{0}' is not found. + + + File path is not valid. + + + Must specify a non-null subscription name. + + + The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription. + + + Removing public environment is not supported. + + + The subscription id {0} doesn't exist. + + + Subscription name needs to be specified. + + + The subscription name {0} doesn't exist. + + + Subscription needs to be specified. + + + User name is not valid. + + + User name needs to be specified. + + + "There is no current context, please log in using Connect-AzAccount." + + + No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount? + + + No certificate was found in the certificate store with thumbprint {0} + + + Illegal characters in path. + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + "{0}" is an invalid DNS name for {1} + + + The provided file in {0} must be have {1} extension + + + {0} is invalid or empty + + + Please connect to internet before executing this cmdlet + + + Path {0} doesn't exist. + + + Path for {0} doesn't exist in {1}. + + + &whr={0} + + + The provided service name {0} already exists, please pick another name + + + Unable to update mismatching Json structured: {0} {1}. + + + (x86) + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. +Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enable-AzureDataCollection. + + + Execution failed because a background thread could not prompt the user. + + + Azure Long-Running Job + + + The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter. + 0(string): exception message in background task + + + Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts. + + + Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter. + + + Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again. + + + Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter. + + + [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}' + 0(bool): whether cmdlet confirmation is required + + + [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}' + 0(string): method type + + + [AzureLongRunningJob]: Completing cmdlet execution in RunJob + + + [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}' + 0(string): last state, 1(string): new state, 2(string): state change reason + + + [AzureLongRunningJob]: Unblocking job due to stoppage or failure + + + [AzureLongRunningJob]: Unblocking job that was previously blocked. + + + [AzureLongRunningJob]: Error in cmdlet execution + + + [AzureLongRunningJob]: Removing state changed event handler, exception '{0}' + 0(string): exception message + + + [AzureLongRunningJob]: ShouldMethod '{0}' unblocked. + 0(string): methodType + + + +- The parameter : '{0}' is changing. + + + +- The parameter : '{0}' is becoming mandatory. + + + +- The parameter : '{0}' is being replaced by parameter : '{1}'. + + + +- The parameter : '{0}' is being replaced by mandatory parameter : '{1}'. + + + +- Change description : {0} + + + The cmdlet is being deprecated. There will be no replacement for it. + + + The cmdlet parameter set is being deprecated. There will be no replacement for it. + + + The cmdlet '{0}' is replacing this cmdlet. + + + +- The output type is changing from the existing type :'{0}' to the new type :'{1}' + + + +- The output type '{0}' is changing + + + +- The following properties are being added to the output type : + + + +- The following properties in the output type are being deprecated : + + + {0} + + + +- Cmdlet : '{0}' + - {1} + + + Upcoming breaking changes in the cmdlet '{0}' : + + + +- This change will take effect on '{0}' + + + +- The change is expected to take effect from version : '{0}' + + + ```powershell +# Old +{0} + +# New +{1} +``` + + + + +Cmdlet invocation changes : + Old Way : {0} + New Way : {1} + + + +The output type '{0}' is being deprecated without a replacement. + + + +The type of the parameter is changing from '{0}' to '{1}'. + + + +Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. + + + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' + + \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Response.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Response.cs new file mode 100644 index 000000000000..a30ca484e540 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Response.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System; + using System.Threading.Tasks; + public class Response : EventData + { + public Response() : base() + { + } + } + + public class Response : Response + { + private Func> _resultDelegate; + private Task _resultValue; + + public Response(T value) : base() => _resultValue = Task.FromResult(value); + public Response(Func value) : base() => _resultDelegate = () => Task.FromResult(value()); + public Response(Func> value) : base() => _resultDelegate = value; + public Task Result => _resultValue ?? (_resultValue = this._resultDelegate()); + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/JsonSerializer.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/JsonSerializer.cs new file mode 100644 index 000000000000..98321e08e8da --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/JsonSerializer.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal class JsonSerializer + { + private int depth = 0; + + private SerializationOptions options = new SerializationOptions(); + + #region Deserialization + + internal T Deseralize(JsonObject json) + where T : new() + { + var contract = JsonModelCache.Get(typeof(T)); + + return (T)DeserializeObject(contract, json); + } + + internal object DeserializeObject(JsonModel contract, JsonObject json) + { + var instance = Activator.CreateInstance(contract.Type); + + depth++; + + // Ensure we don't recurse forever + if (depth > 5) throw new Exception("Depth greater than 5"); + + foreach (var field in json) + { + var member = contract[field.Key]; + + if (member != null) + { + var value = DeserializeValue(member, field.Value); + + member.SetValue(instance, value); + } + } + + depth--; + + return instance; + } + + private object DeserializeValue(JsonMember member, JsonNode value) + { + if (value.Type == JsonType.Null) return null; + + var type = member.Type; + + if (member.IsStringLike && value.Type != JsonType.String) + { + // Take the long path... + return DeserializeObject(JsonModelCache.Get(type), (JsonObject)value); + } + else if (member.Converter != null) + { + return member.Converter.FromJson(value); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (member.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + private object DeserializeValue(Type type, JsonNode value) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + + if (value.Type == JsonType.Null) return null; + + var typeDetails = TypeDetails.Get(type); + + if (typeDetails.JsonConverter != null) + { + return typeDetails.JsonConverter.FromJson(value); + } + else if (typeDetails.IsEnum) + { + return Enum.Parse(type, value.ToString(), ignoreCase: true); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (typeDetails.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + internal Array DeserializeArray(Type type, JsonArray elements) + { + var elementType = type.GetElementType(); + + var elementTypeDetails = TypeDetails.Get(elementType); + + var array = Array.CreateInstance(elementType, elements.Count); + + int i = 0; + + if (elementTypeDetails.JsonConverter != null) + { + foreach (var value in elements) + { + array.SetValue(elementTypeDetails.JsonConverter.FromJson(value), i); + + i++; + } + } + else + { + foreach (var value in elements) + { + array.SetValue(DeserializeValue(elementType, value), i); + + i++; + } + } + + return array; + } + + internal IList DeserializeList(Type type, JsonArray jsonArray) + { + // TODO: Handle non-generic types + if (!type.IsGenericType) + throw new ArgumentException("Must be a generic type", nameof(type)); + + var elementType = type.GetGenericArguments()[0]; + + IList list; + + if (type.IsInterface) + { + // Create a concrete generic list + list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + } + else + { + list = (IList)Activator.CreateInstance(type); + } + + foreach (var value in jsonArray) + { + list.Add(DeserializeValue(elementType, value)); + } + + return list; + } + + #endregion + + #region Serialization + + internal JsonNode Serialize(object instance) => + Serialize(instance, SerializationOptions.Default); + + internal JsonNode Serialize(object instance, string[] include) => + Serialize(instance, new SerializationOptions { Include = include }); + + internal JsonNode Serialize(object instance, SerializationOptions options) + { + this.options = options; + + if (instance == null) + { + return XNull.Instance; + } + + return ReadValue(instance.GetType(), instance); + } + + #region Readers + + internal JsonArray ReadArray(IEnumerable collection) + { + var array = new XNodeArray(); + + foreach (var item in collection) + { + array.Add(ReadValue(item.GetType(), item)); + } + + return array; + } + + internal IEnumerable> ReadProperties(object instance) + { + var contract = JsonModelCache.Get(instance.GetType()); + + foreach (var member in contract.Members) + { + string name = member.Name; + + if (options.PropertyNameTransformer != null) + { + name = options.PropertyNameTransformer.Invoke(name); + } + + // Skip the field if it's not included + if ((depth == 1 && !options.IsIncluded(name))) + { + continue; + } + + var value = member.GetValue(instance); + + if (!member.EmitDefaultValue && (value == null || (member.IsList && ((IList)value).Count == 0) || value.Equals(member.DefaultValue))) + { + continue; + } + else if (options.IgnoreNullValues && value == null) // Ignore null values + { + continue; + } + + // Transform the value if there is one + if (options.Transformations != null) + { + var transform = options.GetTransformation(name); + + if (transform != null) + { + value = transform.Transformer(value); + } + } + + yield return new KeyValuePair(name, ReadValue(member.TypeDetails, value)); + } + } + + private JsonObject ReadObject(object instance) + { + depth++; + + // TODO: Guard against a self referencing graph + if (depth > options.MaxDepth) + { + depth--; + + return new JsonObject(); + } + + var node = new JsonObject(ReadProperties(instance)); + + depth--; + + return node; + } + + private JsonNode ReadValue(Type type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + var member = TypeDetails.Get(type); + + return ReadValue(member, value); + } + + private JsonNode ReadValue(TypeDetails type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + if (type.JsonConverter != null) + { + return type.JsonConverter.ToJson(value); + } + else if (type.IsArray) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateArray((string[])value); + case TypeCode.UInt16: return CreateArray((ushort[])value); + case TypeCode.UInt32: return CreateArray((uint[])value); + case TypeCode.UInt64: return CreateArray((ulong[])value); + case TypeCode.Int16: return CreateArray((short[])value); + case TypeCode.Int32: return CreateArray((int[])value); + case TypeCode.Int64: return CreateArray((long[])value); + case TypeCode.Single: return CreateArray((float[])value); + case TypeCode.Double: return CreateArray((double[])value); + default: return ReadArray((IEnumerable)value); + } + } + else if (value is IEnumerable) + { + if (type.IsList && type.ElementType != null) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateList(value); + case TypeCode.UInt16: return CreateList(value); + case TypeCode.UInt32: return CreateList(value); + case TypeCode.UInt64: return CreateList(value); + case TypeCode.Int16: return CreateList(value); + case TypeCode.Int32: return CreateList(value); + case TypeCode.Int64: return CreateList(value); + case TypeCode.Single: return CreateList(value); + case TypeCode.Double: return CreateList(value); + } + } + + return ReadArray((IEnumerable)value); + } + else + { + // Complex object + return ReadObject(value); + } + } + + private XList CreateList(object value) => new XList((IList)value); + + private XImmutableArray CreateArray(T[] array) => new XImmutableArray(array); + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/PropertyTransformation.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/PropertyTransformation.cs new file mode 100644 index 000000000000..ad97a1bf725d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/PropertyTransformation.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal class PropertyTransformation + { + internal PropertyTransformation(string name, Func transformer) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Transformer = transformer ?? throw new ArgumentNullException(nameof(transformer)); + } + + internal string Name { get; } + + internal Func Transformer { get; } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/SerializationOptions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/SerializationOptions.cs new file mode 100644 index 000000000000..0325325be801 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Serialization/SerializationOptions.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal class SerializationOptions + { + internal static readonly SerializationOptions Default = new SerializationOptions(); + + internal SerializationOptions() { } + + internal SerializationOptions( + string[] include = null, + bool ingoreNullValues = false) + { + Include = include; + IgnoreNullValues = ingoreNullValues; + } + + internal string[] Include { get; set; } + + internal string[] Exclude { get; set; } + + internal bool IgnoreNullValues { get; set; } + + internal PropertyTransformation[] Transformations { get; set; } + + internal Func PropertyNameTransformer { get; set; } + + internal int MaxDepth { get; set; } = 5; + + internal bool IsIncluded(string name) + { + if (Exclude != null) + { + return !Exclude.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + else if (Include != null) + { + return Include.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return true; + } + + internal PropertyTransformation GetTransformation(string propertyName) + { + if (Transformations == null) return null; + + foreach (var t in Transformations) + { + if (t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)) + { + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/SerializationMode.cs b/src/Oracle/Oracle.Autorest/generated/runtime/SerializationMode.cs new file mode 100644 index 000000000000..b3363024b8b5 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/SerializationMode.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + [System.Flags] + public enum SerializationMode + { + None = 0, + IncludeHeaders = 1 << 0, + IncludeRead = 1 << 1, + IncludeCreate = 1 << 2, + IncludeUpdate = 1 << 3, + IncludeAll = IncludeHeaders | IncludeRead | IncludeCreate | IncludeUpdate, + IncludeCreateOrUpdate = IncludeCreate | IncludeUpdate + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/TypeConverterExtensions.cs b/src/Oracle/Oracle.Autorest/generated/runtime/TypeConverterExtensions.cs new file mode 100644 index 000000000000..1494be5ba0dd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/TypeConverterExtensions.cs @@ -0,0 +1,261 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.PowerShell +{ + internal static class TypeConverterExtensions + { + internal static T[] SelectToArray(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0]; // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result.ToArray(); + } + + internal static System.Collections.Generic.List SelectToList(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }.ToList(); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0].ToList(); // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result; + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Management.Automation.PSObject instance) + { + if (null != instance) + { + foreach (var each in instance.Properties) + { + yield return each; + } + } + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.Generic.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys.OfType() + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Management.Automation.PSObject instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + // new global::System.Collections.Generic.HashSet(System.StringComparer.InvariantCultureIgnoreCase) + return (null == instance || !instance.Properties.Any()) ? + Enumerable.Empty>() : + instance.Properties + .Where(property => + !(true == exclusions?.Contains(property.Name)) + && (false != inclusions?.Contains(property.Name))) + .Select(property => new System.Collections.Generic.KeyValuePair(property.Name, property.Value)); + } + + + internal static T GetValueForProperty(this System.Collections.Generic.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys, each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + internal static T GetValueForProperty(this System.Collections.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys.OfType(), each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static T GetValueForProperty(this System.Management.Automation.PSObject psObject, string propertyName, T defaultValue, System.Func converter) + { + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return property == null ? defaultValue : (T)converter(property.Value); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static bool Contains(this System.Management.Automation.PSObject psObject, string propertyName) + { + bool result = false; + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + result = property == null ? false : true; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return result; + } + } +} diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/UndeclaredResponseException.cs b/src/Oracle/Oracle.Autorest/generated/runtime/UndeclaredResponseException.cs new file mode 100644 index 000000000000..b4adde6a01dc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/UndeclaredResponseException.cs @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System; + using System.Net.Http; + using System.Net.Http.Headers; + using static Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Extensions; + + public class RestException : Exception, IDisposable + { + public System.Net.HttpStatusCode StatusCode { get; set; } + public string Code { get; protected set; } + protected string message; + public HttpRequestMessage RequestMessage { get; protected set; } + public HttpResponseHeaders ResponseHeaders { get; protected set; } + + public string ResponseBody { get; protected set; } + public string ClientRequestId { get; protected set; } + public string RequestId { get; protected set; } + + public override string Message => message; + public string Action { get; protected set; } + + public RestException(System.Net.Http.HttpResponseMessage response) + { + StatusCode = response.StatusCode; + //CloneWithContent will not work here since the content is disposed after sendAsync + //Besides, it seems there is no need for the request content cloned here. + RequestMessage = response.RequestMessage.Clone(); + ResponseBody = response.Content.ReadAsStringAsync().Result; + ResponseHeaders = response.Headers; + + RequestId = response.GetFirstHeader("x-ms-request-id"); + ClientRequestId = response.GetFirstHeader("x-ms-client-request-id"); + + try + { + // try to parse the body as JSON, and see if a code and message are in there. + var json = Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json.JsonObject; + + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + + // see if there is an error block in the body + json = json?.Property("error") ?? json; + + { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } + { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } + { Action = If(json?.PropertyT("action"), out var a) ? (string)a : (string)Action; } + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // couldn't get the code/message from the body response. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } + } +#endif + if (string.IsNullOrEmpty(message)) + { + if (StatusCode >= System.Net.HttpStatusCode.BadRequest && StatusCode < System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Request Error, Status: {StatusCode}"; + } + else if (StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Server Error, Status: {StatusCode}"; + } + else + { + message = $"The server responded with an unrecognized response, Status: {StatusCode}"; + } + } + } + + public void Dispose() + { + ((IDisposable)RequestMessage).Dispose(); + } + } + + public class RestException : RestException + { + public T Error { get; protected set; } + public RestException(System.Net.Http.HttpResponseMessage response, T error) : base(response) + { + Error = error; + } + } + + + public class UndeclaredResponseException : RestException + { + public UndeclaredResponseException(System.Net.Http.HttpResponseMessage response) : base(response) + { + + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/Writers/JsonWriter.cs b/src/Oracle/Oracle.Autorest/generated/runtime/Writers/JsonWriter.cs new file mode 100644 index 000000000000..7fda7d3bb841 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/Writers/JsonWriter.cs @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Web; + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.Json +{ + internal class JsonWriter + { + const string indentation = " "; // 2 spaces + + private readonly bool pretty; + private readonly TextWriter writer; + + protected int currentLevel = 0; + + internal JsonWriter(TextWriter writer, bool pretty = true) + { + this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); + this.pretty = pretty; + } + + internal void WriteNode(JsonNode node) + { + switch (node.Type) + { + case JsonType.Array: WriteArray((IEnumerable)node); break; + case JsonType.Object: WriteObject((JsonObject)node); break; + + // Primitives + case JsonType.Binary: WriteBinary((XBinary)node); break; + case JsonType.Boolean: WriteBoolean((bool)node); break; + case JsonType.Date: WriteDate((JsonDate)node); break; + case JsonType.Null: WriteNull(); break; + case JsonType.Number: WriteNumber((JsonNumber)node); break; + case JsonType.String: WriteString(node); break; + } + } + + internal void WriteArray(IEnumerable array) + { + currentLevel++; + + writer.Write('['); + + bool doIndentation = false; + + if (pretty) + { + foreach (var node in array) + { + if (node.Type == JsonType.Object || node.Type == JsonType.Array) + { + doIndentation = true; + + break; + } + } + } + + bool isFirst = true; + + foreach (JsonNode node in array) + { + if (!isFirst) writer.Write(','); + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + WriteNode(node); + + isFirst = false; + } + + currentLevel--; + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + writer.Write(']'); + } + + internal void WriteIndent() + { + if (pretty) + { + writer.Write(Environment.NewLine); + + for (int level = 0; level < currentLevel; level++) + { + writer.Write(indentation); + } + } + } + + internal void WriteObject(JsonObject obj) + { + currentLevel++; + + writer.Write('{'); + + bool isFirst = true; + + foreach (var field in obj) + { + if (!isFirst) writer.Write(','); + + WriteIndent(); + + WriteFieldName(field.Key); + + writer.Write(':'); + + if (pretty) + { + writer.Write(' '); + } + + // Write the field value + WriteNode(field.Value); + + isFirst = false; + } + + currentLevel--; + + WriteIndent(); + + writer.Write('}'); + } + + internal void WriteFieldName(string fieldName) + { + writer.Write('"'); + writer.Write(HttpUtility.JavaScriptStringEncode(fieldName)); + writer.Write('"'); + } + + #region Primitives + + internal void WriteBinary(XBinary value) + { + writer.Write('"'); + writer.Write(value.ToString()); + writer.Write('"'); + } + + internal void WriteBoolean(bool value) + { + writer.Write(value ? "true" : "false"); + } + + internal void WriteDate(JsonDate date) + { + if (date.ToDateTime().Year == 1) + { + WriteNull(); + } + else + { + writer.Write('"'); + writer.Write(date.ToIsoString()); + writer.Write('"'); + } + } + + internal void WriteNull() + { + writer.Write("null"); + } + + internal void WriteNumber(JsonNumber number) + { + if (number.Overflows) + { + writer.Write('"'); + writer.Write(number.Value); + writer.Write('"'); + } + else + { + writer.Write(number.Value); + } + } + + internal void WriteString(string text) + { + if (text == null) + { + WriteNull(); + } + else + { + writer.Write('"'); + + writer.Write(HttpUtility.JavaScriptStringEncode(text)); + + writer.Write('"'); + } + } + + #endregion + } +} + + +// TODO: Replace with System.Text.Json when available diff --git a/src/Oracle/Oracle.Autorest/generated/runtime/delegates.cs b/src/Oracle/Oracle.Autorest/generated/runtime/delegates.cs new file mode 100644 index 000000000000..85f8f66a7893 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/generated/runtime/delegates.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData=System.Func; + + public delegate Task SendAsync(HttpRequestMessage request, IEventListener callback); + public delegate Task SendAsyncStep(HttpRequestMessage request, IEventListener callback, ISendAsync next); + public delegate Task SignalEvent(string id, CancellationToken token, GetEventData getEventData); + public delegate Task Event(EventData message); + public delegate void SynchEvent(EventData message); + public delegate Task OnResponse(Response message); + public delegate Task OnResponse(Response message); +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/help/Add-AzOracleCloudVMClusterVM.md b/src/Oracle/Oracle.Autorest/help/Add-AzOracleCloudVMClusterVM.md new file mode 100644 index 000000000000..64173cbd907e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Add-AzOracleCloudVMClusterVM.md @@ -0,0 +1,261 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/add-azoraclecloudvmclustervm +schema: 2.0.0 +--- + +# Add-AzOracleCloudVMClusterVM + +## SYNOPSIS +Add VMs to the VM Cluster + +## SYNTAX + +### AddExpanded (Default) +``` +Add-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName -DbServer + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### AddViaIdentityExpanded +``` +Add-AzOracleCloudVMClusterVM -InputObject -DbServer [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### AddViaJsonFilePath +``` +Add-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### AddViaJsonString +``` +Add-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Add VMs to the VM Cluster + +## EXAMPLES + +### Example 1: Add a VM to a Cloud VM Cluster resource +```powershell +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToAdd = @($dbServerOcid1) + +Add-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName $resourceGroup -DbServer $dbServersToAdd +``` + +Add a VM to a Cloud VM Cluster resource. +For more information, execute `Get-Help Add-AzOracleCloudVMClusterVM`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: AddExpanded, AddViaJsonFilePath, AddViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +Db servers ocids + +```yaml +Type: System.String[] +Parameter Sets: AddExpanded, AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Add operation + +```yaml +Type: System.String +Parameter Sets: AddViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Add operation + +```yaml +Type: System.String +Parameter Sets: AddViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: AddExpanded, AddViaJsonFilePath, AddViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: AddExpanded, AddViaJsonFilePath, AddViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Az.Oracle.md b/src/Oracle/Oracle.Autorest/help/Az.Oracle.md new file mode 100644 index 000000000000..3e78c4c4ccb4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Az.Oracle.md @@ -0,0 +1,106 @@ +--- +Module Name: Az.Oracle +Module Guid: 50196261-2b3a-4dac-808d-3a2a25b147cd +Download Help Link: https://learn.microsoft.com/powershell/module/az.oracle +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.Oracle Module +## Description +Microsoft Azure PowerShell: Oracle cmdlets + +## Az.Oracle Cmdlets +### [Add-AzOracleCloudVMClusterVM](Add-AzOracleCloudVMClusterVM.md) +Add VMs to the VM Cluster + +### [Get-AzOracleAutonomousDatabase](Get-AzOracleAutonomousDatabase.md) +Get a AutonomousDatabase + +### [Get-AzOracleAutonomousDatabaseBackup](Get-AzOracleAutonomousDatabaseBackup.md) +Get a AutonomousDatabaseBackup + +### [Get-AzOracleAutonomousDatabaseCharacterSet](Get-AzOracleAutonomousDatabaseCharacterSet.md) +Get a AutonomousDatabaseCharacterSet + +### [Get-AzOracleAutonomousDatabaseNationalCharacterSet](Get-AzOracleAutonomousDatabaseNationalCharacterSet.md) +Get a AutonomousDatabaseNationalCharacterSet + +### [Get-AzOracleAutonomousDatabaseVersion](Get-AzOracleAutonomousDatabaseVersion.md) +Get a AutonomousDbVersion + +### [Get-AzOracleCloudExadataInfrastructure](Get-AzOracleCloudExadataInfrastructure.md) +Get a CloudExadataInfrastructure + +### [Get-AzOracleCloudVMCluster](Get-AzOracleCloudVMCluster.md) +Get a CloudVmCluster + +### [Get-AzOracleDbNode](Get-AzOracleDbNode.md) +Get a DbNode + +### [Get-AzOracleDbServer](Get-AzOracleDbServer.md) +Get a DbServer + +### [Get-AzOracleDbSystemShape](Get-AzOracleDbSystemShape.md) +Get a DbSystemShape + +### [Get-AzOracleDnsPrivateView](Get-AzOracleDnsPrivateView.md) +Get a DnsPrivateView + +### [Get-AzOracleDnsPrivateZone](Get-AzOracleDnsPrivateZone.md) +Get a DnsPrivateZone + +### [Get-AzOracleGiVersion](Get-AzOracleGiVersion.md) +Get a GiVersion + +### [Invoke-AzOracleActionDbNode](Invoke-AzOracleActionDbNode.md) +VM actions on DbNode of VM Cluster by the provided filter + +### [Invoke-AzOracleSwitchoverAutonomousDatabase](Invoke-AzOracleSwitchoverAutonomousDatabase.md) +Perform switchover action on Autonomous Database + +### [New-AzOracleAutonomousDatabase](New-AzOracleAutonomousDatabase.md) +Create a AutonomousDatabase + +### [New-AzOracleAutonomousDatabaseBackup](New-AzOracleAutonomousDatabaseBackup.md) +Create a AutonomousDatabaseBackup + +### [New-AzOracleCloudExadataInfrastructure](New-AzOracleCloudExadataInfrastructure.md) +Create a CloudExadataInfrastructure + +### [New-AzOracleCloudVMCluster](New-AzOracleCloudVMCluster.md) +Create a CloudVmCluster + +### [New-AzOracleCustomerContactObject](New-AzOracleCustomerContactObject.md) +Create an in-memory object for CustomerContact. + +### [New-AzOracleNsgCidrObject](New-AzOracleNsgCidrObject.md) +Create an in-memory object for NsgCidr. + +### [Remove-AzOracleAutonomousDatabase](Remove-AzOracleAutonomousDatabase.md) +Delete a AutonomousDatabase + +### [Remove-AzOracleAutonomousDatabaseBackup](Remove-AzOracleAutonomousDatabaseBackup.md) +Delete a AutonomousDatabaseBackup + +### [Remove-AzOracleCloudExadataInfrastructure](Remove-AzOracleCloudExadataInfrastructure.md) +Delete a CloudExadataInfrastructure + +### [Remove-AzOracleCloudVMCluster](Remove-AzOracleCloudVMCluster.md) +Delete a CloudVmCluster + +### [Remove-AzOracleCloudVMClusterVM](Remove-AzOracleCloudVMClusterVM.md) +Remove VMs from the VM Cluster + +### [Restore-AzOracleAutonomousDatabase](Restore-AzOracleAutonomousDatabase.md) +Restores an Autonomous Database based on the provided request parameters. + +### [Update-AzOracleAutonomousDatabase](Update-AzOracleAutonomousDatabase.md) +Update a AutonomousDatabase + +### [Update-AzOracleCloudExadataInfrastructure](Update-AzOracleCloudExadataInfrastructure.md) +Update a CloudExadataInfrastructure + +### [Update-AzOracleCloudVMCluster](Update-AzOracleCloudVMCluster.md) +Update a CloudVmCluster + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..4738d7da09d2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabase.md @@ -0,0 +1,201 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabase + +## SYNOPSIS +Get a AutonomousDatabase + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabase [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabase -InputObject [-DefaultProfile ] + [] +``` + +### List1 +``` +Get-AzOracleAutonomousDatabase -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabase + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database resources +```powershell +Get-AzOracleAutonomousDatabase +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashbur + n-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subn + ets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:19:26 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Get an Autonomous Database resource by name and resource group name. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..b4b36917926c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,186 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasebackup +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseBackup + +## SYNOPSIS +Get a AutonomousDatabaseBackup + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseBackup -InputObject [-DefaultProfile ] + [] +``` + +### GetViaIdentityAutonomousDatabase +``` +Get-AzOracleAutonomousDatabaseBackup -Adbbackupid -AutonomousDatabaseInputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database Backups for an Autonomous Database resource +```powershell +Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +Jul 06, 2024 01:54:13 UTC PowerShellTestRg +Jul 05, 2024 15:26:01 UTC PowerShellTestRg +autonomousdatabasebackup20240705141147 PowerShellTestRg +autonomousdatabasebackup20240705135809 PowerShellTestRg +Jul 04, 2024 12:00:52 UTC PowerShellTestRg +``` + +Get a list of the Autonomous Database Backups for an Autonomous Database resource. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseBackup` + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityAutonomousDatabase +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousDatabaseInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityAutonomousDatabase +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseCharacterSet.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseCharacterSet.md new file mode 100644 index 000000000000..1ac7e00e2a88 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseCharacterSet.md @@ -0,0 +1,166 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasecharacterset +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseCharacterSet + +## SYNOPSIS +Get a AutonomousDatabaseCharacterSet + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseCharacterSet -Location [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseCharacterSet -Adbscharsetname -Location + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseCharacterSet -InputObject [-DefaultProfile ] + [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleAutonomousDatabaseCharacterSet -Adbscharsetname -LocationInputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseCharacterSet + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database Character Sets by location +```powershell +(Get-AzOracleAutonomousDatabaseCharacterSet -Location "eastus").CharacterSet +``` + +```output +AL32UTF8 +AR8ADOS710 +AR8ADOS720 +``` + +Get a list of the Autonomous Database Character Sets by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseCharacterSet`. + +## PARAMETERS + +### -Adbscharsetname +AutonomousDatabaseCharacterSet name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md new file mode 100644 index 000000000000..24e34494e5c3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md @@ -0,0 +1,165 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasenationalcharacterset +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseNationalCharacterSet + +## SYNOPSIS +Get a AutonomousDatabaseNationalCharacterSet + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -Adbsncharsetname -Location + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -InputObject [-DefaultProfile ] + [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -Adbsncharsetname + -LocationInputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseNationalCharacterSet + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database National Character Sets by location +```powershell +(Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location "eastus").CharacterSet +``` + +```output +AL16UTF16 +UTF8 +``` + +Get a list of the Autonomous Database National Character Sets by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseNationalCharacterSet`. + +## PARAMETERS + +### -Adbsncharsetname +AutonomousDatabaseNationalCharacterSets name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseVersion.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseVersion.md new file mode 100644 index 000000000000..4d7698cb6e97 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleAutonomousDatabaseVersion.md @@ -0,0 +1,168 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabaseversion +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseVersion + +## SYNOPSIS +Get a AutonomousDbVersion + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseVersion -Location [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseVersion -Autonomousdbversionsname -Location + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseVersion -InputObject [-DefaultProfile ] + [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleAutonomousDatabaseVersion -Autonomousdbversionsname + -LocationInputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDbVersion + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database Versions by location +```powershell +Get-AzOracleAutonomousDatabaseVersion -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +19c +19c +19c +``` + +Get a list of the Autonomous Database Versions by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseVersion`. + +## PARAMETERS + +### -Autonomousdbversionsname +AutonomousDbVersion name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..7db5eac13c03 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,189 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# Get-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Get a CloudExadataInfrastructure + +## SYNTAX + +### List (Default) +``` +Get-AzOracleCloudExadataInfrastructure [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleCloudExadataInfrastructure -InputObject [-DefaultProfile ] + [] +``` + +### List1 +``` +Get-AzOracleCloudExadataInfrastructure -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Get a list of the Cloud Exadata Infrastructure resources +```powershell +Get-AzOracleCloudExadataInfrastructure +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +eastus OFake_PowerShellTestExaInfra 04/07/2024 13:20:00 example@oracle.com User 06/07/2024 11:04:06 857ad006-4380-4712-ba4c-22f7c64d84e7 Application PowerShellTestRg +eastus DemoExaInfra 05/07/2024 08:20:01 example@oracle.com User 06/07/2024 11:04:07 857ad006-4380-4712-ba4c-22f7c64d84e7 Application SDKTestRG +germanywestcentral OFake_ppratees_0216_2 16/02/2024 20:24:39 example@oracle.com User 06/07/2024 11:03:57 857ad006-4380-4712-ba4c-22f7c64d84e7 Application ObsTestingFra +``` + +Get a list of the Cloud Exadata Infrastructure resources. +For more information, execute `Get-Help Get-AzOracleCloudExadataInfrastructure`. + +### Example 2: Get a Cloud Exadata Infrastructure resource by name and resource group name +```powershell +Get-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +... +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbu + uk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsa + e5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 08:49:18 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Get a Cloud Exadata Infrastructure resource by name. +For more information, execute `Get-Help Get-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..d422f9034c42 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleCloudVMCluster.md @@ -0,0 +1,185 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# Get-AzOracleCloudVMCluster + +## SYNOPSIS +Get a CloudVmCluster + +## SYNTAX + +### List (Default) +``` +Get-AzOracleCloudVMCluster [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleCloudVMCluster -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzOracleCloudVMCluster -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a CloudVmCluster + +## EXAMPLES + +### Example 1: Get a list of the Cloud VM Cluster resources +```powershell +Get-AzOracleCloudVMCluster +``` + +```output +... +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-group + s/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?regio + n=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa xxx} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/sub + nets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:04:17 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +SystemVersion : +Tag : { + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Get a Cloud VM Cluster resource by name and resource group name. +For more information, execute `Get-Help Get-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbNode.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbNode.md new file mode 100644 index 000000000000..6aefaaf0a0fd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbNode.md @@ -0,0 +1,182 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbnode +schema: 2.0.0 +--- + +# Get-AzOracleDbNode + +## SYNOPSIS +Get a DbNode + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDbNode -Cloudvmclustername -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDbNode -Cloudvmclustername -Ocid -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDbNode -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCloudVMCluster +``` +Get-AzOracleDbNode -CloudVMClusterInputObject -Ocid [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a DbNode + +## EXAMPLES + +### Example 1: Get a list of the Database Nodes for a Cloud VM Cluster resource +```powershell +Get-AzOracleDbNode -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa PowerShellTestRg +ocid1.dbnode.oc1.iad.anuwcljrnirvylqaqm24luvmhsaaz2wtiq3ggddpsemx6gn66vff5rulsgnq PowerShellTestRg +``` + +Get a list of the Database Nodes for a Cloud VM Cluster resource. +For more information, execute `Get-Help Get-AzOracleDbNode` + +## PARAMETERS + +### -CloudVMClusterInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityCloudVMCluster +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DbNode OCID. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCloudVMCluster +Aliases: Dbnodeocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbServer.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbServer.md new file mode 100644 index 000000000000..a7a3aca5cda1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbServer.md @@ -0,0 +1,183 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbserver +schema: 2.0.0 +--- + +# Get-AzOracleDbServer + +## SYNOPSIS +Get a DbServer + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDbServer -Cloudexadatainfrastructurename -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDbServer -Cloudexadatainfrastructurename -Ocid -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDbServer -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityCloudExadataInfrastructure +``` +Get-AzOracleDbServer -CloudExadataInfrastructureInputObject -Ocid + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a DbServer + +## EXAMPLES + +### Example 1: Get a list of the Database Servers for a Cloud Exadata Infrastructure resource +```powershell +Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +dbServer-2 PowerShellTestRg +dbServer-3 PowerShellTestRg +dbServer-1 PowerShellTestRg +``` + +Get a list of the Database Servers for a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Get-AzOracleDbServer`. + +## PARAMETERS + +### -CloudExadataInfrastructureInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityCloudExadataInfrastructure +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudexadatainfrastructurename +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DbServer OCID. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCloudExadataInfrastructure +Aliases: Dbserverocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbSystemShape.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbSystemShape.md new file mode 100644 index 000000000000..ba3f250e36a1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDbSystemShape.md @@ -0,0 +1,192 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbsystemshape +schema: 2.0.0 +--- + +# Get-AzOracleDbSystemShape + +## SYNOPSIS +Get a DbSystemShape + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDbSystemShape -Location [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleDbSystemShape -Location -Name [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDbSystemShape -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleDbSystemShape -LocationInputObject -Name [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a DbSystemShape + +## EXAMPLES + +### Example 1: Get a list of the Database System Shapes by location +```powershell +Get-AzOracleDbSystemShape -Location "eastus" +``` + +```output +AvailableCoreCount : 0 +AvailableCoreCountPerNode : 126 +AvailableDataStorageInTb : 63 +AvailableDataStoragePerServerInTb : +AvailableDbNodePerNodeInGb : 2243 +AvailableDbNodeStorageInGb : +AvailableMemoryInGb : +AvailableMemoryPerNodeInGb : 1390 +CoreCountIncrement : +Id : /subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dbSystemShapes/Exadata.X9M +MaxStorageCount : +MaximumNodeCount : 32 +MinCoreCountPerNode : 0 +MinDataStorageInTb : 2 +MinDbNodeStoragePerNodeInGb : 60 +MinMemoryPerNodeInGb : 30 +MinStorageCount : +MinimumCoreCount : 0 +MinimumNodeCount : 2 +Name : Exadata.X9M +ResourceGroupName : +RuntimeMinimumCoreCount : +ShapeFamily : EXADATA +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Oracle.Database/Locations/dbSystemShapes +``` + +Get a list of the Database System Shapes by location. +For more information, execute `Get-Help Get-AzOracleDbSystemShape`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +DbSystemShape name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Dbsystemshapename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateView.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateView.md new file mode 100644 index 000000000000..2c2197f08cf3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateView.md @@ -0,0 +1,167 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivateview +schema: 2.0.0 +--- + +# Get-AzOracleDnsPrivateView + +## SYNOPSIS +Get a DnsPrivateView + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDnsPrivateView -Location [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleDnsPrivateView -Location -Ocid [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDnsPrivateView -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleDnsPrivateView -LocationInputObject -Ocid [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a DnsPrivateView + +## EXAMPLES + +### Example 1: Get a list of the DNS Private Views by location +```powershell +Get-AzOracleDnsPrivateView -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza +ocid1.dnsview.oc1.iad.aaaaaaaalf3jpv4bmwdg6nxw7ciudrb3smln6a46h7asgrwoironcxuoslea +ocid1.dnsview.oc1.iad.aaaaaaaags4sek6p7ocgs5sjarfm26dgmz23yegxxwqk4aowebismrbbgm6q +``` + +Get a list of the DNS Private Views by location. +For more information, execute `Get-Help Get-AzOracleDnsPrivateView`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DnsPrivateView OCID + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Dnsprivateviewocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateZone.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateZone.md new file mode 100644 index 000000000000..e49b0c4c21c3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleDnsPrivateZone.md @@ -0,0 +1,167 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivatezone +schema: 2.0.0 +--- + +# Get-AzOracleDnsPrivateZone + +## SYNOPSIS +Get a DnsPrivateZone + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDnsPrivateZone -Location [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleDnsPrivateZone -Location -Name [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDnsPrivateZone -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleDnsPrivateZone -LocationInputObject -Name [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a DnsPrivateZone + +## EXAMPLES + +### Example 1: Get a list of the DNS Private Zones by location +```powershell +Get-AzOracleDnsPrivateZone -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +byui3zo3.ocidelegated.ocipstestvnet.adb.us-ashburn-1.oraclevcn.com +byui3zo3.adb.us-ashburn-1.oraclevcn.com +byui3zo3.adbapps.us-ashburn-1.oraclevcn.com +``` + +Get a list of the DNS Private Zones by location. +For more information, execute `Get-Help Get-AzOracleDnsPrivateZone`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +DnsPrivateZone name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Dnsprivatezonename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Get-AzOracleGiVersion.md b/src/Oracle/Oracle.Autorest/help/Get-AzOracleGiVersion.md new file mode 100644 index 000000000000..872ad78aedc3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Get-AzOracleGiVersion.md @@ -0,0 +1,166 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclegiversion +schema: 2.0.0 +--- + +# Get-AzOracleGiVersion + +## SYNOPSIS +Get a GiVersion + +## SYNTAX + +### List (Default) +``` +Get-AzOracleGiVersion -Location [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleGiVersion -Location -Name [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleGiVersion -InputObject [-DefaultProfile ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleGiVersion -LocationInputObject -Name [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Get a GiVersion + +## EXAMPLES + +### Example 1: Get a list of the Grid Infrastructure Versions by location +```powershell +Get-AzOracleGiVersion -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +19.0.0.0 +23.0.0.0 +``` + +Get a list of the Grid Infrastructure Versions by location. +For more information, execute `Get-Help Get-AzOracleGiVersion`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +GiVersion name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Giversionname + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Invoke-AzOracleActionDbNode.md b/src/Oracle/Oracle.Autorest/help/Invoke-AzOracleActionDbNode.md new file mode 100644 index 000000000000..d711dd5c680f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Invoke-AzOracleActionDbNode.md @@ -0,0 +1,387 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleactiondbnode +schema: 2.0.0 +--- + +# Invoke-AzOracleActionDbNode + +## SYNOPSIS +VM actions on DbNode of VM Cluster by the provided filter + +## SYNTAX + +### ActionExpanded (Default) +``` +Invoke-AzOracleActionDbNode -Cloudvmclustername -Dbnodeocid -ResourceGroupName + -Action [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### ActionViaIdentityCloudVMClusterExpanded +``` +Invoke-AzOracleActionDbNode -CloudVMClusterInputObject -Dbnodeocid -Action + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ActionViaIdentityExpanded +``` +Invoke-AzOracleActionDbNode -InputObject -Action [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ActionViaJsonFilePath +``` +Invoke-AzOracleActionDbNode -Cloudvmclustername -Dbnodeocid -ResourceGroupName + -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### ActionViaJsonString +``` +Invoke-AzOracleActionDbNode -Cloudvmclustername -Dbnodeocid -ResourceGroupName + -JsonString [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +VM actions on DbNode of VM Cluster by the provided filter + +## EXAMPLES + +### Example 1: Stop a VM in a Cloud VM Cluster resource +```powershell +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$stopActionName = "Stop" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $stopActionName +``` + +```output +AdditionalDetail : +BackupIPId : ocid1.privateIp.fake.2.1 +BackupVnic2Id : ocid1.vnic.fake.2.1 +BackupVnicId : +CpuCoreCount : 2 +DbServerId : ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq +DbSystemId : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +FaultDomain : +HostIPId : ocid1.privateIp.fake.1.1 +Hostname : host-wq5t62 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz + 22lazevdaoiye7bh4iy2nwfa +LifecycleDetail : +LifecycleState : +MaintenanceType : +MemorySizeInGb : 45 +Name : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +Ocid : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +ProvisioningState : Stopping +ResourceGroupName : PowerShellTestRg +SoftwareStorageSizeInGb : +StorageSizeInGb : 90 +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TimeCreated : 04/07/2024 16:09:39 +TimeMaintenanceWindowEnd : +TimeMaintenanceWindowStart : +Type : Oracle.Database/cloudVmClusters/dbNodes +Vnic2Id : ocid1.vnic.fake.1.1 +VnicId : +``` + +Stop a VM in a Cloud VM Cluster resource. +For more information, execute `Get-Help Invoke-AzOracleActionDbNode`. + +### Example 2: Start a VM in a Cloud VM Cluster resource +```powershell +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$startActionName = "Start" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $startActionName +``` + +```output +AdditionalDetail : +BackupIPId : ocid1.privateIp.fake.2.1 +BackupVnic2Id : ocid1.vnic.fake.2.1 +BackupVnicId : +CpuCoreCount : 2 +DbServerId : ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq +DbSystemId : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +FaultDomain : +HostIPId : ocid1.privateIp.fake.1.1 +Hostname : host-wq5t62 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz + 22lazevdaoiye7bh4iy2nwfa +LifecycleDetail : +LifecycleState : +MaintenanceType : +MemorySizeInGb : 45 +Name : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +Ocid : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +ProvisioningState : Starting +ResourceGroupName : PowerShellTestRg +SoftwareStorageSizeInGb : +StorageSizeInGb : 90 +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TimeCreated : 04/07/2024 16:09:39 +TimeMaintenanceWindowEnd : +TimeMaintenanceWindowStart : +Type : Oracle.Database/cloudVmClusters/dbNodes +Vnic2Id : ocid1.vnic.fake.1.1 +VnicId : +``` + +Start a VM in a Cloud VM Cluster resource. +For more information, execute `Get-Help Invoke-AzOracleActionDbNode`. + +## PARAMETERS + +### -Action +Db action + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaIdentityCloudVMClusterExpanded, ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudVMClusterInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: ActionViaIdentityCloudVMClusterExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaJsonFilePath, ActionViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Dbnodeocid +DbNode OCID. + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaIdentityCloudVMClusterExpanded, ActionViaJsonFilePath, ActionViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Action operation + +```yaml +Type: System.String +Parameter Sets: ActionViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Action operation + +```yaml +Type: System.String +Parameter Sets: ActionViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaJsonFilePath, ActionViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaJsonFilePath, ActionViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md new file mode 100644 index 000000000000..2b0fc1f2c7d3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md @@ -0,0 +1,255 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleswitchoverautonomousdatabase +schema: 2.0.0 +--- + +# Invoke-AzOracleSwitchoverAutonomousDatabase + +## SYNOPSIS +Perform switchover action on Autonomous Database + +## SYNTAX + +### SwitchoverExpanded (Default) +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename -ResourceGroupName + [-SubscriptionId ] [-PeerDbId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### SwitchoverViaIdentityExpanded +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -InputObject [-PeerDbId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### SwitchoverViaJsonFilePath +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename -ResourceGroupName + -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### SwitchoverViaJsonString +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename -ResourceGroupName + -JsonString [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Perform switchover action on Autonomous Database + +## EXAMPLES + +### Example 1: Switchover an Autonomous Database resource +```powershell +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -PeerDbId "PeerDbId" +``` + +Switchover an Autonomous Database resource. +For more information, execute `Get-Help Invoke-AzOracleSwitchoverAutonomousDatabase`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaJsonFilePath, SwitchoverViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: SwitchoverViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Switchover operation + +```yaml +Type: System.String +Parameter Sets: SwitchoverViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Switchover operation + +```yaml +Type: System.String +Parameter Sets: SwitchoverViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbId +The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaJsonFilePath, SwitchoverViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaJsonFilePath, SwitchoverViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..fd7023a03961 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabase.md @@ -0,0 +1,795 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# New-AzOracleAutonomousDatabase + +## SYNOPSIS +Create a AutonomousDatabase + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleAutonomousDatabase -Name -ResourceGroupName -Location + [-SubscriptionId ] [-AdminPassword ] [-AutonomousDatabaseId ] + [-AutonomousMaintenanceScheduleType ] [-BackupRetentionPeriodInDay ] [-CharacterSet ] + [-ComputeCount ] [-ComputeModel ] [-CpuCoreCount ] + [-CustomerContact ] [-DatabaseEdition ] [-DataBaseType ] + [-DataStorageSizeInGb ] [-DataStorageSizeInTb ] [-DayOfWeekName ] [-DbVersion ] + [-DbWorkload ] [-DisplayName ] [-IsAutoScalingEnabled] [-IsAutoScalingForStorageEnabled] + [-IsLocalDataGuardEnabled] [-IsMtlsConnectionRequired] [-IsPreviewVersionWithServiceTermsAccepted] + [-LicenseModel ] [-NcharacterSet ] [-PrivateEndpointIP ] + [-PrivateEndpointLabel ] [-ScheduledStartTime ] [-ScheduledStopTime ] + [-SubnetId ] [-Tag ] [-VnetId ] [-WhitelistedIP ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleAutonomousDatabase -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonString +``` +New-AzOracleAutonomousDatabase -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a AutonomousDatabase + +## EXAMPLES + +### Example 1: Create an Autonomous Database resource +```powershell +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +[SecureString]$adbsAdminPassword = ConvertTo-SecureString -String "PowerShellTestPass123" -AsPlainText -Force + +$adbsName = "OFakePowerShellTestAdbs" +New-AzOracleAutonomousDatabase -Name $adbsName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $adbsName -DbWorkload "OLTP" -ComputeCount 2.0 -ComputeModel "ECPU" -DbVersion "19c" -DataStorageSizeInGb 32 -AdminPassword $adbsAdminPassword -LicenseModel "BringYourOwnLicense" -SubnetId $subnetId -VnetId $vnetId -DataBaseType "Regular" -CharacterSet "AL32UTF8" -NcharacterSet "AL16UTF16" +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashbur + n-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subn + ets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:19:26 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Create an Autonomous Database resource. +For more information, execute `Get-Help New-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AdminPassword +Admin password. + +```yaml +Type: System.Security.SecureString +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousDatabaseId +Autonomous Database ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousMaintenanceScheduleType +The maintenance schedule type of the Autonomous Database Serverless. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupRetentionPeriodInDay +Retention period, in days, for long-term backups + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CharacterSet +The character set for the autonomous database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The compute amount (CPUs) available to the database. + +```yaml +Type: System.Single +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeModel +The compute model of the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores to be made available to the database. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +Customer Contacts. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseEdition +The Oracle Database Edition that applies to the Autonomous databases. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataBaseType +Database type to be created. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInGb +The size, in gigabytes, of the data volume that will be created and attached to the database. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The quantity of data in the database, in terabytes. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DayOfWeekName +Name of the day of the week. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbVersion +A valid Oracle Database version for Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbWorkload +The Autonomous Database workload type + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingEnabled +Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingForStorageEnabled +Indicates if auto scaling is enabled for the Autonomous Database storage. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalDataGuardEnabled +Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMtlsConnectionRequired +Specifies if the Autonomous Database requires mTLS connections. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsPreviewVersionWithServiceTermsAccepted +Specifies if the Autonomous Database preview version is being provisioned. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the Oracle Autonomous Database. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NcharacterSet +The character set for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateEndpointIP +The private endpoint Ip address for the resource. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateEndpointLabel +The resource's private endpoint label. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStartTime +auto start time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStopTime +auto stop time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Client subnet + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnetId +VNET for network connectivity + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhitelistedIP +The client IP access control list (ACL). +This is an array of CIDR notations and/or IP addresses. +Values should be separate strings, separated by commas. +Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..b3d49e6c8999 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/New-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,264 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabasebackup +schema: 2.0.0 +--- + +# New-AzOracleAutonomousDatabaseBackup + +## SYNOPSIS +Create a AutonomousDatabaseBackup + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DisplayName ] + [-RetentionPeriodInDay ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonString +``` +New-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName -JsonString [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: Create a Backup for an Autonomous Database resource +```powershell +New-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -RetentionPeriodInDay 90 +``` + +Create a Backup for an Autonomous Database resource. +For more information, execute `Get-Help New-AzOracleAutonomousDatabaseBackup`. + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the backup. +The name does not have to be unique. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionPeriodInDay +Retention period, in days, for long-term backups. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/New-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/help/New-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..e3cf5d915fb8 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/New-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,531 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# New-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Create a CloudExadataInfrastructure + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName -Location + -Zone [-SubscriptionId ] [-ComputeCount ] [-CustomerContact ] + [-DisplayName ] [-MaintenanceWindowCustomActionTimeoutInMin ] + [-MaintenanceWindowDaysOfWeek ] [-MaintenanceWindowHoursOfDay ] + [-MaintenanceWindowIsCustomActionTimeoutEnabled] [-MaintenanceWindowIsMonthlyPatchingEnabled] + [-MaintenanceWindowLeadTimeInWeek ] [-MaintenanceWindowMonth ] + [-MaintenanceWindowPatchingMode ] [-MaintenanceWindowPreference ] + [-MaintenanceWindowWeeksOfMonth ] [-Shape ] [-StorageCount ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonString +``` +New-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Create a Cloud Exadata Infrastructure resource +```powershell +New-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Location "eastus" -Zone @("2") -Shape "Exadata.X9M" -ComputeCount 3 -StorageCount 3 -DisplayName "OFake_PowerShellTestExaInfra" +``` + +```output +... +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbu + uk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsa + e5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 08:49:18 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Create a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help New-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The number of compute servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. +Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. +Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The name for the Exadata infrastructure. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowCustomActionTimeoutInMin +Determines the amount of time the system will wait before the start of each database server patching operation. +Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowDaysOfWeek +Days during the week when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowHoursOfDay +The window of hours during the day when maintenance should be performed. +The window is a 4 hour slot. +Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + +```yaml +Type: System.Int32[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsCustomActionTimeoutEnabled +If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsMonthlyPatchingEnabled +is Monthly Patching Enabled + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowLeadTimeInWeek +Lead time window allows user to set a lead time to prepare for a down time. +The lead time is in weeks and valid value is between 1 to 4. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowMonth +Months during the year when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPatchingMode +Cloud Exadata infrastructure node patching method. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPreference +The maintenance window scheduling preference. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowWeeksOfMonth +Weeks during the month when maintenance should be performed. +Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. +Weeks start and end based on calendar dates, not days of the week. +For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. +Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. +Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + +```yaml +Type: System.Int32[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Shape +The model name of the cloud Exadata infrastructure resource. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageCount +The number of storage servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +CloudExadataInfrastructure zones + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/New-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/help/New-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..1b7a8c2658e3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/New-AzOracleCloudVMCluster.md @@ -0,0 +1,767 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# New-AzOracleCloudVMCluster + +## SYNOPSIS +Create a CloudVmCluster + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleCloudVMCluster -Name -ResourceGroupName -Location + [-SubscriptionId ] [-BackupSubnetCidr ] [-CloudExadataInfrastructureId ] + [-ClusterName ] [-CpuCoreCount ] [-DataCollectionOptionIsDiagnosticsEventsEnabled] + [-DataCollectionOptionIsHealthMonitoringEnabled] [-DataCollectionOptionIsIncidentLogsEnabled] + [-DataStoragePercentage ] [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] + [-DbServer ] [-DisplayName ] [-Domain ] [-GiVersion ] [-Hostname ] + [-IsLocalBackupEnabled] [-IsSparseDiskgroupEnabled] [-LicenseModel ] [-MemorySizeInGb ] + [-NsgCidr ] [-OcpuCount ] [-ScanListenerPortTcp ] + [-ScanListenerPortTcpSsl ] [-SshPublicKey ] [-SubnetId ] [-SystemVersion ] + [-Tag ] [-TimeZone ] [-VnetId ] [-ZoneId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleCloudVMCluster -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaJsonString +``` +New-AzOracleCloudVMCluster -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a CloudVmCluster + +## EXAMPLES + +### Example 1: Create a Cloud VM Cluster resource +```powershell +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +$sshPublicKey = "ssh-rsa xxx" + +$resourceGroup = "PowerShellTestRg" +$exaInfraName = "OFake_PowerShellTestExaInfra" +$exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $exaInfraName -ResourceGroupName $resourceGroup +$exaInfraId = $exaInfra.Id + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $exaInfraName -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServerOcid2 = $dbServerList[1].Ocid + +$vmClusterName = "OFake_PowerShellTestVmCluster" +New-AzOracleCloudVMCluster -Name $vmClusterName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $vmClusterName -HostName "host" -CpuCoreCount 4 -CloudExadataInfrastructureId $exaInfraId -SshPublicKey $sshPublicKey -VnetId $vnetId -GiVersion "19.0.0.0" -SubnetId $subnetId -LicenseModel "LicenseIncluded" -ClusterName "TestVMC" -MemorySizeInGb 90 -DbNodeStorageSizeInGb 180 -DataStorageSizeInTb 2.0 -DataStoragePercentage 80 -TimeZone "UTC" -DbServer @($dbServerOcid1, $dbServerOcid2) +``` + +```output +... +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-group + s/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?regio + n=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa xxx} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/sub + nets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:04:17 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +SystemVersion : +Tag : { + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Create a Cloud VM Cluster resource. +For more information, execute `Get-Help New-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupSubnetCidr +Client OCI backup subnet CIDR, default is 192.168.252.0/22 + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudExadataInfrastructureId +Cloud Exadata Infrastructure ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The cluster name for cloud VM cluster. +The cluster name must begin with an alphabetic character, and may contain hyphens (-). +Underscores (_) are not permitted. +The cluster name can be no longer than 11 characters and is not case sensitive. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores enabled on the cloud VM cluster. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsDiagnosticsEventsEnabled +Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsHealthMonitoringEnabled +Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsIncidentLogsEnabled +Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStoragePercentage +The percentage assigned to DATA storage (user data and database files). +The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). +Accepted values are 35, 40, 60 and 80. +The default is 80 percent assigned to DATA storage. +See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The data disk group size to be allocated in TBs. + +```yaml +Type: System.Double +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbNodeStorageSizeInGb +The local node storage to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +The list of DB servers. + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display Name + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Domain +The domain name for the cloud VM cluster. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GiVersion +Oracle Grid Infrastructure (GI) software version + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Hostname +The hostname for the cloud VM cluster. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalBackupEnabled +If true, database backup on local Exadata storage is configured for the cloud VM cluster. +If false, database backup on local Exadata storage is not available in the cloud VM cluster. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSparseDiskgroupEnabled +If true, sparse disk group is configured for the cloud VM cluster. +If false, sparse disk group is not created. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the cloud VM cluster. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MemorySizeInGb +The memory to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NsgCidr +CIDR blocks for additional NSG ingress rules. +The VNET CIDRs used to provision the VM Cluster will be added by default. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OcpuCount +The number of OCPU cores to enable on the cloud VM cluster. +Only 1 decimal place is allowed for the fractional part. + +```yaml +Type: System.Single +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcp +The TCP Single Client Access Name (SCAN) port. +The default port is 1521. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcpSsl +The TCPS Single Client Access Name (SCAN) port. +The default port is 2484. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Client subnet + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemVersion +Operating system version of the image. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeZone +The time zone of the cloud VM cluster. +For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnetId +VNET for network connectivity + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ZoneId +The OCID of the zone the cloud VM cluster is associated with. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/New-AzOracleCustomerContactObject.md b/src/Oracle/Oracle.Autorest/help/New-AzOracleCustomerContactObject.md new file mode 100644 index 000000000000..2dc704953754 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/New-AzOracleCustomerContactObject.md @@ -0,0 +1,61 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclecustomercontactobject +schema: 2.0.0 +--- + +# New-AzOracleCustomerContactObject + +## SYNOPSIS +Create an in-memory object for CustomerContact. + +## SYNTAX + +``` +New-AzOracleCustomerContactObject -Email [] +``` + +## DESCRIPTION +Create an in-memory object for CustomerContact. + +## EXAMPLES + +### Example 1: Create an in-memory object for CustomerContact +```powershell +New-AzOracleCustomerContactObject -Email "example@oracle.com" +``` + +Create an in-memory object for CustomerContact. +For more information, execute `Get-Help New-AzOracleNsgCidrObject`. + +## PARAMETERS + +### -Email +The email address used by Oracle to send notifications regarding databases and infrastructure. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/New-AzOracleNsgCidrObject.md b/src/Oracle/Oracle.Autorest/help/New-AzOracleNsgCidrObject.md new file mode 100644 index 000000000000..eaa1ee07ebbd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/New-AzOracleNsgCidrObject.md @@ -0,0 +1,93 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclensgcidrobject +schema: 2.0.0 +--- + +# New-AzOracleNsgCidrObject + +## SYNOPSIS +Create an in-memory object for NsgCidr. + +## SYNTAX + +``` +New-AzOracleNsgCidrObject -Source [-DestinationPortRangeMax ] + [-DestinationPortRangeMin ] [] +``` + +## DESCRIPTION +Create an in-memory object for NsgCidr. + +## EXAMPLES + +### Example 1: Create an in-memory object for NsgCidr +```powershell +New-AzOracleNsgCidrObject -Source "source" -DestinationPortRangeMax 0 -DestinationPortRangeMin 1 +``` + +Create an in-memory object for NsgCidr. +For more information, execute `Get-Help New-AzOracleNsgCidrObject`. + +## PARAMETERS + +### -DestinationPortRangeMax +The maximum port number, which must not be less than the minimum port number. +To specify a single port number, set both the min and max to the same value. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationPortRangeMin +The minimum port number, which must not be greater than the maximum port number. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Source +Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/README.md b/src/Oracle/Oracle.Autorest/help/README.md new file mode 100644 index 000000000000..cfadeafe7e55 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.Oracle` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.Oracle` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..cdcfc3d0431c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabase.md @@ -0,0 +1,216 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Remove-AzOracleAutonomousDatabase + +## SYNOPSIS +Delete a AutonomousDatabase + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleAutonomousDatabase -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a AutonomousDatabase + +## EXAMPLES + +### Example 1: Delete an Autonomous Database resource +```powershell +Remove-AzOracleAutonomousDatabase -NoWait -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/e6c5d63d-1c35-427e-8183-aa8c3bb8d8cc*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-vers… +``` + +Delete an Autonomous Database resource. +For more information, execute `Get-Help Remove-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..d7dd605080e2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabasebackup +schema: 2.0.0 +--- + +# Remove-AzOracleAutonomousDatabaseBackup + +## SYNOPSIS +Delete a AutonomousDatabaseBackup + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleAutonomousDatabaseBackup -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityAutonomousDatabase +``` +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid -AutonomousDatabaseInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: Delete a Backup for an Autonomous Database resource +```powershell +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +Delete a Backup for an Autonomous Database resource. +For more information, execute `Get-Help Remove-AzOracleAutonomousDatabaseBackup`. + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityAutonomousDatabase +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousDatabaseInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentityAutonomousDatabase +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..53e2395f8454 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,217 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# Remove-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Delete a CloudExadataInfrastructure + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleCloudExadataInfrastructure -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Delete a Cloud Exadata Infrastructure resource +```powershell +Remove-AzOracleCloudExadataInfrastructure -NoWait -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/adefb987-d10e-4d60-a429-43a6d8737e05*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-vers… +``` + +Delete a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Remove-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..a7956f06e32b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMCluster.md @@ -0,0 +1,216 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# Remove-AzOracleCloudVMCluster + +## SYNOPSIS +Delete a CloudVmCluster + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleCloudVMCluster -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a CloudVmCluster + +## EXAMPLES + +### Example 1: Delete a Cloud VM Cluster resource +```powershell +Remove-AzOracleCloudVMCluster -NoWait -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a6742d9f-d4fe-4d66-94b4-6df3a1322228*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-vers… +``` + +Delete a Cloud VM Cluster resource. +For more information, execute `Get-Help Remove-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMClusterVM.md b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMClusterVM.md new file mode 100644 index 000000000000..a392bde0115a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Remove-AzOracleCloudVMClusterVM.md @@ -0,0 +1,291 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmclustervm +schema: 2.0.0 +--- + +# Remove-AzOracleCloudVMClusterVM + +## SYNOPSIS +Remove VMs from the VM Cluster + +## SYNTAX + +### RemoveExpanded (Default) +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName -DbServer + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### Remove +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + -Body [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### RemoveViaIdentity +``` +Remove-AzOracleCloudVMClusterVM -InputObject -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RemoveViaIdentityExpanded +``` +Remove-AzOracleCloudVMClusterVM -InputObject -DbServer + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RemoveViaJsonFilePath +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + -JsonFilePath [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### RemoveViaJsonString +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Remove VMs from the VM Cluster + +## EXAMPLES + +### Example 1: Remove a VM from a Cloud VM Cluster resource +```powershell +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToRemove = @($dbServerOcid1) + +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -DbServer $dbServersToRemove +``` + +Remove a VM from a Cloud VM Cluster resource. +For more information, execute `Get-Help Remove-AzOracleCloudVMClusterVM`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Add/Remove (Virtual Machine) DbNode model + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode +Parameter Sets: Remove, RemoveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded, RemoveViaJsonFilePath, RemoveViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +Db servers ocids + +```yaml +Type: System.String[] +Parameter Sets: RemoveExpanded, RemoveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: RemoveViaIdentity, RemoveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Remove operation + +```yaml +Type: System.String +Parameter Sets: RemoveViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Remove operation + +```yaml +Type: System.String +Parameter Sets: RemoveViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded, RemoveViaJsonFilePath, RemoveViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded, RemoveViaJsonFilePath, RemoveViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Restore-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/help/Restore-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..d358b64d3808 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Restore-AzOracleAutonomousDatabase.md @@ -0,0 +1,286 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/restore-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Restore-AzOracleAutonomousDatabase + +## SYNOPSIS +Restores an Autonomous Database based on the provided request parameters. + +## SYNTAX + +### RestoreExpanded (Default) +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName -Timestamp + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### Restore +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName + -Body [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RestoreViaIdentity +``` +Restore-AzOracleAutonomousDatabase -InputObject -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RestoreViaIdentityExpanded +``` +Restore-AzOracleAutonomousDatabase -InputObject -Timestamp + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RestoreViaJsonFilePath +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### RestoreViaJsonString +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Restores an Autonomous Database based on the provided request parameters. + +## EXAMPLES + +### Example 1: Restore a Backup for an Autonomous Database resource +```powershell +$timeStamp = Get-Date +Restore-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Timestamp $timeStamp +``` + +Restore a Backup for an Autonomous Database resource. +For more information, execute `Get-Help Restore-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Details to restore an Oracle Autonomous Database. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails +Parameter Sets: Restore, RestoreViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: RestoreViaIdentity, RestoreViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Restore operation + +```yaml +Type: System.String +Parameter Sets: RestoreViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Restore operation + +```yaml +Type: System.String +Parameter Sets: RestoreViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Restore, RestoreExpanded, RestoreViaJsonFilePath, RestoreViaJsonString +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Restore, RestoreExpanded, RestoreViaJsonFilePath, RestoreViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Restore, RestoreExpanded, RestoreViaJsonFilePath, RestoreViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Timestamp +The time to restore the database to. + +```yaml +Type: System.DateTime +Parameter Sets: RestoreExpanded, RestoreViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Update-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle.Autorest/help/Update-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..3a24e91e9fac --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Update-AzOracleAutonomousDatabase.md @@ -0,0 +1,758 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/update-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Update-AzOracleAutonomousDatabase + +## SYNOPSIS +Update a AutonomousDatabase + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + [-AdminPassword ] [-AutonomousMaintenanceScheduleType ] + [-BackupRetentionPeriodInDay ] [-ComputeCount ] [-CpuCoreCount ] + [-CustomerContact ] [-DatabaseEdition ] [-DataStorageSizeInGb ] + [-DataStorageSizeInTb ] [-DayOfWeekName ] [-DisplayName ] [-IsAutoScalingEnabled] + [-IsAutoScalingForStorageEnabled] [-IsLocalDataGuardEnabled] [-IsMtlsConnectionRequired] + [-LicenseModel ] [-LocalAdgAutoFailoverMaxDataLossLimit ] [-LongTermBackupScheduleIsDisabled] + [-LongTermBackupScheduleRepeatCadence ] [-LongTermBackupScheduleRetentionPeriodInDay ] + [-LongTermBackupScheduleTimeOfBackup ] [-OpenMode ] [-PeerDbId ] + [-PermissionLevel ] [-Role ] [-ScheduledStartTime ] [-ScheduledStopTime ] + [-Tag ] [-WhitelistedIP ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleAutonomousDatabase -InputObject [-AdminPassword ] + [-AutonomousMaintenanceScheduleType ] [-BackupRetentionPeriodInDay ] [-ComputeCount ] + [-CpuCoreCount ] [-CustomerContact ] [-DatabaseEdition ] + [-DataStorageSizeInGb ] [-DataStorageSizeInTb ] [-DayOfWeekName ] + [-DisplayName ] [-IsAutoScalingEnabled] [-IsAutoScalingForStorageEnabled] [-IsLocalDataGuardEnabled] + [-IsMtlsConnectionRequired] [-LicenseModel ] [-LocalAdgAutoFailoverMaxDataLossLimit ] + [-LongTermBackupScheduleIsDisabled] [-LongTermBackupScheduleRepeatCadence ] + [-LongTermBackupScheduleRetentionPeriodInDay ] [-LongTermBackupScheduleTimeOfBackup ] + [-OpenMode ] [-PeerDbId ] [-PermissionLevel ] [-Role ] + [-ScheduledStartTime ] [-ScheduledStopTime ] [-Tag ] [-WhitelistedIP ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzOracleAutonomousDatabase -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaJsonString +``` +Update-AzOracleAutonomousDatabase -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Update a AutonomousDatabase + +## EXAMPLES + +### Example 1: Update an Autonomous Database resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..a + aaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:41:08 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +Tag : { + "tagName": "tagValue" + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Update an Autonomous Database resource. +For more information, execute `Get-Help Update-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AdminPassword +Admin password. + +```yaml +Type: System.Security.SecureString +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousMaintenanceScheduleType +The maintenance schedule type of the Autonomous Database Serverless. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupRetentionPeriodInDay +Retention period, in days, for long-term backups + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The compute amount (CPUs) available to the database. + +```yaml +Type: System.Single +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores to be made available to the database. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +Customer Contacts. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseEdition +The Oracle Database Edition that applies to the Autonomous databases. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInGb +The size, in gigabytes, of the data volume that will be created and attached to the database. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The quantity of data in the database, in terabytes. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DayOfWeekName +Name of the day of the week. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IsAutoScalingEnabled +Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingForStorageEnabled +Indicates if auto scaling is enabled for the Autonomous Database storage. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalDataGuardEnabled +Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMtlsConnectionRequired +Specifies if the Autonomous Database requires mTLS connections. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the Oracle Autonomous Database. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocalAdgAutoFailoverMaxDataLossLimit +Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleIsDisabled +Indicates if the long-term backup schedule should be deleted. +The default value is `FALSE`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRepeatCadence +The frequency of the long-term backup schedule + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRetentionPeriodInDay +Retention period, in days, for backups. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleTimeOfBackup +The timestamp for the long-term backup schedule. +For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + +```yaml +Type: System.DateTime +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OpenMode +Indicates the Autonomous Database mode. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbId +The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionLevel +The Autonomous Database permission level. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Role +The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStartTime +auto start time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStopTime +auto stop time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhitelistedIP +The client IP access control list (ACL). +This is an array of CIDR notations and/or IP addresses. +Values should be separate strings, separated by commas. +Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..7b5523049e52 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,567 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# Update-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Update a CloudExadataInfrastructure + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName + [-SubscriptionId ] [-ComputeCount ] [-CustomerContact ] + [-DisplayName ] [-MaintenanceWindowCustomActionTimeoutInMin ] + [-MaintenanceWindowDaysOfWeek ] [-MaintenanceWindowHoursOfDay ] + [-MaintenanceWindowIsCustomActionTimeoutEnabled] [-MaintenanceWindowIsMonthlyPatchingEnabled] + [-MaintenanceWindowLeadTimeInWeek ] [-MaintenanceWindowMonth ] + [-MaintenanceWindowPatchingMode ] [-MaintenanceWindowPreference ] + [-MaintenanceWindowWeeksOfMonth ] [-StorageCount ] [-Tag ] [-Zone ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleCloudExadataInfrastructure -InputObject [-ComputeCount ] + [-CustomerContact ] [-DisplayName ] + [-MaintenanceWindowCustomActionTimeoutInMin ] [-MaintenanceWindowDaysOfWeek ] + [-MaintenanceWindowHoursOfDay ] [-MaintenanceWindowIsCustomActionTimeoutEnabled] + [-MaintenanceWindowIsMonthlyPatchingEnabled] [-MaintenanceWindowLeadTimeInWeek ] + [-MaintenanceWindowMonth ] [-MaintenanceWindowPatchingMode ] + [-MaintenanceWindowPreference ] [-MaintenanceWindowWeeksOfMonth ] [-StorageCount ] + [-Tag ] [-Zone ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaJsonString +``` +Update-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Update a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Update a Cloud Exadata Infrastructure resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +ActivatedStorageCount : 3 +AdditionalStorageCount : 0 +AvailableStorageSizeInGb : 0 +ComputeCount : 3 +CpuCount : 4 +CustomerContact : +DataStorageSizeInTb : 2 +DbNodeStorageSizeInGb : 938 +DbServerVersion : 23.1.13.0.0.240410.1 +DisplayName : OFake_PowerShellTestExaInfra +EstimatedPatchingTimeEstimatedDbServerPatchingTime : +EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime : +EstimatedPatchingTimeEstimatedStorageServerPatchingTime : +EstimatedPatchingTimeTotalEstimatedPatchingTime : +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra +LastMaintenanceRunId : +LifecycleDetail : +LifecycleState : Available +Location : eastus +MaintenanceWindowCustomActionTimeoutInMin : 0 +MaintenanceWindowDaysOfWeek : +MaintenanceWindowHoursOfDay : +MaintenanceWindowIsCustomActionTimeoutEnabled : False +MaintenanceWindowIsMonthlyPatchingEnabled : +MaintenanceWindowLeadTimeInWeek : 0 +MaintenanceWindowMonth : +MaintenanceWindowPatchingMode : Rolling +MaintenanceWindowPreference : NoPreference +MaintenanceWindowWeeksOfMonth : +MaxCpuCount : 378 +MaxDataStorageInTb : 192 +MaxDbNodeStorageSizeInGb : 6729 +MaxMemoryInGb : 4170 +MemorySizeInGb : 90 +MonthlyDbServerVersion : +MonthlyStorageServerVersion : +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orps + andbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:35:54 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +Tag : { + "tagName": "tagValue" + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Update a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Update-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The number of compute servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. +Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. +Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The name for the Exadata infrastructure. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowCustomActionTimeoutInMin +Determines the amount of time the system will wait before the start of each database server patching operation. +Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowDaysOfWeek +Days during the week when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowHoursOfDay +The window of hours during the day when maintenance should be performed. +The window is a 4 hour slot. +Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + +```yaml +Type: System.Int32[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsCustomActionTimeoutEnabled +If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsMonthlyPatchingEnabled +is Monthly Patching Enabled + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowLeadTimeInWeek +Lead time window allows user to set a lead time to prepare for a down time. +The lead time is in weeks and valid value is between 1 to 4. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowMonth +Months during the year when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPatchingMode +Cloud Exadata infrastructure node patching method. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPreference +The maintenance window scheduling preference. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowWeeksOfMonth +Weeks during the month when maintenance should be performed. +Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. +Weeks start and end based on calendar dates, not days of the week. +For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. +Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. +Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + +```yaml +Type: System.Int32[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageCount +The number of storage servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +CloudExadataInfrastructure zones + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudVMCluster.md b/src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..ef4b7e254db9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/help/Update-AzOracleCloudVMCluster.md @@ -0,0 +1,535 @@ +--- +external help file: +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# Update-AzOracleCloudVMCluster + +## SYNOPSIS +Update a CloudVmCluster + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + [-ComputeNode ] [-CpuCoreCount ] [-DataCollectionOptionIsDiagnosticsEventsEnabled] + [-DataCollectionOptionIsHealthMonitoringEnabled] [-DataCollectionOptionIsIncidentLogsEnabled] + [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] [-DisplayName ] + [-LicenseModel ] [-MemorySizeInGb ] [-OcpuCount ] [-SshPublicKey ] + [-StorageSizeInGb ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleCloudVMCluster -InputObject [-ComputeNode ] [-CpuCoreCount ] + [-DataCollectionOptionIsDiagnosticsEventsEnabled] [-DataCollectionOptionIsHealthMonitoringEnabled] + [-DataCollectionOptionIsIncidentLogsEnabled] [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] + [-DisplayName ] [-LicenseModel ] [-MemorySizeInGb ] [-OcpuCount ] + [-SshPublicKey ] [-StorageSizeInGb ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzOracleCloudVMCluster -Name -ResourceGroupName -JsonFilePath + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaJsonString +``` +Update-AzOracleCloudVMCluster -Name -ResourceGroupName -JsonString + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Update a CloudVmCluster + +## EXAMPLES + +### Example 1: Update a Cloud VM Cluster resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudVMCluster -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +BackupSubnetCidr : +CloudExadataInfrastructureId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra +ClusterName : TestVMC +CompartmentId : ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +ComputeNode : +CpuCoreCount : 4 +DataCollectionOptionIsDiagnosticsEventsEnabled : False +DataCollectionOptionIsHealthMonitoringEnabled : False +DataCollectionOptionIsIncidentLogsEnabled : False +DataStoragePercentage : 80 +DataStorageSizeInTb : 2 +DbNodeStorageSizeInGb : 180 +DbServer : {ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq, ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq} +DiskRedundancy : High +DisplayName : OFake_PowerShellTestVmCluster +Domain : ocidelegated.ocipstestvnet.oraclevcn.com +GiVersion : 19.9.0.0.0 +Hostname : host-wq5t6 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster +IormConfigCacheDbPlan : +IormConfigCacheLifecycleDetail : +IormConfigCacheLifecycleState : +IormConfigCacheObjective : +IsLocalBackupEnabled : False +IsSparseDiskgroupEnabled : False +LastUpdateHistoryEntryId : +LicenseModel : LicenseIncluded +LifecycleDetail : +LifecycleState : Available +ListenerPort : 1521 +Location : eastus +MemorySizeInGb : 90 +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi + 4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compart + ment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDM + N6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwV + KPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:39:06 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +SystemVersion : +Tag : { + "tagName": "tagValue" + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Update a Cloud VM Cluster resource. +For more information, execute `Get-Help Update-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeNode +The list of compute servers to be added to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores enabled on the cloud VM cluster. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsDiagnosticsEventsEnabled +Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsHealthMonitoringEnabled +Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsIncidentLogsEnabled +Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The data disk group size to be allocated in TBs. + +```yaml +Type: System.Double +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbNodeStorageSizeInGb +The local node storage to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display Name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the cloud VM cluster. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MemorySizeInGb +The memory to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OcpuCount +The number of OCPU cores to enable on the cloud VM cluster. +Only 1 decimal place is allowed for the fractional part. + +```yaml +Type: System.Single +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageSizeInGb +The data disk group size to be allocated in GBs per VM. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/src/Oracle/Oracle.Autorest/how-to.md b/src/Oracle/Oracle.Autorest/how-to.md new file mode 100644 index 000000000000..178e0e823882 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.Oracle`. + +## Building `Az.Oracle` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [README.md](exports/README.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [README.md](custom/README.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [README.md](examples/README.md) in the `examples` folder. To read more about documentation, look at the [README.md](docs/README.md) in the `docs` folder. + +## Testing `Az.Oracle` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. + +## Packing `Az.Oracle` +To pack `Az.Oracle` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.Oracle`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.Oracle.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.Oracle.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.Oracle`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.Oracle` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/internal/Az.Oracle.internal.psm1 b/src/Oracle/Oracle.Autorest/internal/Az.Oracle.internal.psm1 new file mode 100644 index 000000000000..09d617c1fe69 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/internal/Az.Oracle.internal.psm1 @@ -0,0 +1,38 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Oracle.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Module]::Instance + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = $PSScriptRoot + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } +# endregion diff --git a/src/Oracle/Oracle.Autorest/internal/Get-AzOracleOperation.ps1 b/src/Oracle/Oracle.Autorest/internal/Get-AzOracleOperation.ps1 new file mode 100644 index 000000000000..fc3a2061c413 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/internal/Get-AzOracleOperation.ps1 @@ -0,0 +1,125 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleoperation +#> +function Get-AzOracleOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.Oracle.private\Get-AzOracleOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/Oracle/Oracle.Autorest/internal/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..fc3a2061c413 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,125 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleoperation +#> +function Get-AzOracleOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.Oracle.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.Oracle.private\Get-AzOracleOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/src/Oracle/Oracle.Autorest/internal/README.md b/src/Oracle/Oracle.Autorest/internal/README.md new file mode 100644 index 000000000000..3ef3c32c18c9 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/internal/README.md @@ -0,0 +1,14 @@ +# Internal +This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The `Az.Oracle.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.Oracle`. Instead, this sub-module is imported by the `..\custom\Az.Oracle.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.Oracle.internal\Get-Example` would call an internal cmdlet named `Get-Example`. + +## Purpose +This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.Oracle`. diff --git a/src/Oracle/Oracle.Autorest/pack-module.ps1 b/src/Oracle/Oracle.Autorest/pack-module.ps1 new file mode 100644 index 000000000000..2f30ca3fffa0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/pack-module.ps1 @@ -0,0 +1,17 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +Write-Host -ForegroundColor Green 'Packing module...' +dotnet pack $PSScriptRoot --no-build /nologo +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/run-module.ps1 b/src/Oracle/Oracle.Autorest/run-module.ps1 new file mode 100644 index 000000000000..bd96e99bc67e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/run-module.ps1 @@ -0,0 +1,62 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Code) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +$isAzure = $true +if($isAzure) { + . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts + # Load the latest version of Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Oracle.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +function Prompt { + Write-Host -NoNewline -ForegroundColor Green "PS $(Get-Location)" + Write-Host -NoNewline -ForegroundColor Gray ' [' + Write-Host -NoNewline -ForegroundColor White -BackgroundColor DarkCyan $moduleName + ']> ' +} + +# where we would find the launch.json file +$vscodeDirectory = New-Item -ItemType Directory -Force -Path (Join-Path $PSScriptRoot '.vscode') +$launchJson = Join-Path $vscodeDirectory 'launch.json' + +# if there is a launch.json file, let's just assume -Code, and update the file +if(($Code) -or (test-Path $launchJson) ) { + $launchContent = '{ "version": "0.2.0", "configurations":[{ "name":"Attach to PowerShell", "type":"coreclr", "request":"attach", "processId":"' + ([System.Diagnostics.Process]::GetCurrentProcess().Id) + '", "justMyCode":false }] }' + Set-Content -Path $launchJson -Value $launchContent + if($Code) { + # only launch vscode if they say -code + code $PSScriptRoot + } +} + +Import-Module -Name $modulePath \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test-module.ps1 b/src/Oracle/Oracle.Autorest/test-module.ps1 new file mode 100644 index 000000000000..038f2ef4954d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test-module.ps1 @@ -0,0 +1,98 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$NotIsolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +$ErrorActionPreference = 'Stop' + +if(-not $NotIsolated) +{ + Write-Host -ForegroundColor Green 'Creating isolated process...' + if ($PSBoundParameters.ContainsKey("TestName")) { + $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," + } + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated + return +} + +# This is a workaround, since for string array parameter, pwsh -File will only take the first element +if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and ($TestName[0].Contains(','))) { + $TestName = $TestName[0].Split(",") +} + +$ProgressPreference = 'SilentlyContinue' +$baseName = $PSScriptRoot.BaseName +$requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -NotIsolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. ("$PSScriptRoot\test\utils.ps1") + +if ($requireResourceModule) +{ + # Load the latest Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version + $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') + Import-Module -Name $resourceModulePSD.FullName +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated\modules' +if(Test-Path -Path $localModulesPath) +{ + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.Oracle.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +Import-Module -Name Pester +Import-Module -Name $modulePath + +$TestMode = 'playback' +$ExcludeTag = @("LiveOnly") +if($Live) +{ + $TestMode = 'live' + $ExcludeTag = @() +} +if($Record) +{ + $TestMode = 'record' +} +try +{ + if ($TestMode -ne 'playback') + { + setupEnv + } else { + $env:AzPSAutorestTestPlaybackMode = $true + } + $testFolder = Join-Path $PSScriptRoot 'test' + if ($null -ne $TestName) + { + Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } else { + Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } +} Finally +{ + if ($TestMode -ne 'playback') + { + cleanupEnv + } + else { + $env:AzPSAutorestTestPlaybackMode = '' + } +} + +Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Recording.json b/src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Recording.json new file mode 100644 index 000000000000..a3288713bd35 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Recording.json @@ -0,0 +1,89 @@ +{ + "Add-AzOracleCloudVMClusterVM+[NoContext]+AddExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "ff5ea5be-519f-4f75-bb1d-3628a8ebece3" ], + "CommandName": [ "Get-AzOracleDbServer" ], + "FullCommandName": [ "Get-AzOracleDbServer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/9BF76BB9C0FCFC2CA577A6C7D2ABDB56/C52C5263B45640E9D5477DF838F83EA4" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "0e016009-ebf6-4d06-a33a-835c4fe283e6" ], + "x-ms-correlation-request-id": [ "1c06f5b7-9742-4049-9f02-31d47558a5f0" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKWEST:20240711T111913Z:1c06f5b7-9742-4049-9f02-31d47558a5f0" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 38C7D0E43D3A437D8963291FEA94B525 Ref B: AMS231022012051 Ref C: 2024-07-11T11:19:11Z" ], + "Date": [ "Thu, 11 Jul 2024 11:19:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4013" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqabgfb24a7f6y6g3fgumvdu4yu2mskss7kyu7lzmbfirba\",\"name\":\"dbServer-3\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqabgfb24a7f6y6g3fgumvdu4yu2mskss7kyu7lzmbfirba\",\"displayName\":\"dbServer-3\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqakjfdf2qyze4p5leu572snxk6cbrbukejyfdtxggfquuq\",\"cpuCoreCount\":2,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":469,\"vmClusterIds\":[\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqa2w4bxkv4t2ockflwjmwb32osa5exkeg7uitm7ympgaxa\"],\"dbNodeIds\":[\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqamrsva3izm7qognghvksp2ufs2xbti6gcpz3jbcum7xka\"],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":45,\"shape\":null,\"timeCreated\":\"2024-07-07T07:39:59.498Z\",\"lifecycleDetails\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqajnh2fibjkgd4ehwqjscbr4shpbkzt2sqdvx3zuf77t5q\",\"name\":\"dbServer-1\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqajnh2fibjkgd4ehwqjscbr4shpbkzt2sqdvx3zuf77t5q\",\"displayName\":\"dbServer-1\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqakjfdf2qyze4p5leu572snxk6cbrbukejyfdtxggfquuq\",\"cpuCoreCount\":2,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":469,\"vmClusterIds\":[\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqa2w4bxkv4t2ockflwjmwb32osa5exkeg7uitm7ympgaxa\"],\"dbNodeIds\":[\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqaq6oz536w75cduu5aot6obj4n2miwqmso55xmmh23hwjq\"],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":45,\"shape\":null,\"timeCreated\":\"2024-07-07T07:39:59.495Z\",\"lifecycleDetails\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqao6qc4wjphqn3ccwd6jjqjynoexlhu23q35cwqdmedixa\",\"name\":\"dbServer-2\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqao6qc4wjphqn3ccwd6jjqjynoexlhu23q35cwqdmedixa\",\"displayName\":\"dbServer-2\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqakjfdf2qyze4p5leu572snxk6cbrbukejyfdtxggfquuq\",\"cpuCoreCount\":0,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":0,\"vmClusterIds\":[],\"dbNodeIds\":[],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":0,\"shape\":null,\"timeCreated\":\"2024-07-07T07:39:59.496Z\",\"lifecycleDetails\":null}}]}", + "isContentBase64": false + } + }, + "Add-AzOracleCloudVMClusterVM+[NoContext]+AddExpanded+$POST+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/addVms?api-version=2023-09-01+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/addVms?api-version=2023-09-01", + "Content": "{\n \"dbServers\": [ \"ocid1.dbserver.oc1.iad.anuwcljrowjpydqao6qc4wjphqn3ccwd6jjqjynoexlhu23q35cwqdmedixa\" ]\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "108" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/92ad8321-7453-476b-99ff-b28b57cd2bc5*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638562935549298696\u0026c=MIIHpTCCBo2gAwIBAgITfwN4zzUuivvTBCLCCQAEA3jPNTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwNjI0MTEyOTU2WhcNMjUwNjE5MTEyOTU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANvVWo1xOJRhTabFDg9tH83KxBFFsI-8hXpNc70gVGUo9vdR_GCto5GXht5Nk15RV9Eui7tLs-n7VOqRt4ZJ5VAjpwORPU0ibxKV9KxuriafJTjL7Qrk0JaSp7WGJqPW-J-Pd5L3tP1bFJur8kjM0bafBsjx64XEFWORLz5Fn2lp6TrN09Jd5b8K0HSCXKW2e3XMjLsNhXY8nqovBeHTMKNIUXpy2nH5fjVOimZk6Q4T6__1OhvvEVJZsCL05KUdxdO_hsLWYu-CjOT4AShuIDdibMapH2IdzaeWrawQNPVXKZ_KeKth7kpbOhSv1QWmfPOy3V9F2YLccUW5EGnQeZUCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBQo83UWtIVJoZyZu85mKVA3wYeN-TAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAIjL4XB6DpRu-qyv5OqJYhIEmeI3Qe1UttC_KzpXoBWbVudKDV9CE0p6ofXSgAL0ecWXtRLq-_0Fc7jpgUBZrqam1Kegg-ApMr78hSiTUCMxHgWpUKN7_6b26skb5WN_0GWObM78VwcVTyKQ7K4Axw_Iik9WglVk9QKreZ9lSNPWhI6DX1bb-Pl2gRDXKY1bw3t_3-FiYyzROsU-9IAJozqZs_m-J3bfkcJ01J8Eg21vEdK-9_4uHA1qfGU7aJr9APH4fc5S9AonGi9UeSEiqG3Bas997LqgN_Wd49UeSnfabQl54UewiQjaFThlNO5qQ9xQ7IuuGjkqAH6M9R_uIo\u0026s=q7PLE07uubWy86RcPWk6PLLj57kTtQxaY-uZK-Vwg_qfmNIxnozP9DNj8CTfc7ZRqUhNbtlhPGpVvLbOIBverXSyPSH6tVMOHZeaqCvOOQxD1kEBgWaRVxdVZYlQPHM4d562UDaeHUrtT5NbHJ8s5STuCXPrDjioEoNvK7n8BH5mdui8gjlO1K_ozmXCGceIEZXVwPwGfq-NvBlTzUQufBVJRw6WExi7V_MwgsxTdQHOPFA1DhFubh1M7gHOBCR4muoY34RwkgfT_JP-p8Q_Pbt9lyBlplhv3x1eNkD88ie3Qc9hEPeD0Z84hnd5b496aZLPTVDiuUcjvtp62oyv-g\u0026h=dRk70gRYNQWeBEWkzHO2W5c4oQoL_-dF0oqjW9HT2rc" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/B87DD52E723C57398A9EAB222DEB1103/395DBB2ED6DFE01BFC9D212C46B3AB0A" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/92ad8321-7453-476b-99ff-b28b57cd2bc5*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638562935549143231\u0026c=MIIHpTCCBo2gAwIBAgITfwN4zzUuivvTBCLCCQAEA3jPNTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwNjI0MTEyOTU2WhcNMjUwNjE5MTEyOTU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANvVWo1xOJRhTabFDg9tH83KxBFFsI-8hXpNc70gVGUo9vdR_GCto5GXht5Nk15RV9Eui7tLs-n7VOqRt4ZJ5VAjpwORPU0ibxKV9KxuriafJTjL7Qrk0JaSp7WGJqPW-J-Pd5L3tP1bFJur8kjM0bafBsjx64XEFWORLz5Fn2lp6TrN09Jd5b8K0HSCXKW2e3XMjLsNhXY8nqovBeHTMKNIUXpy2nH5fjVOimZk6Q4T6__1OhvvEVJZsCL05KUdxdO_hsLWYu-CjOT4AShuIDdibMapH2IdzaeWrawQNPVXKZ_KeKth7kpbOhSv1QWmfPOy3V9F2YLccUW5EGnQeZUCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBQo83UWtIVJoZyZu85mKVA3wYeN-TAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAIjL4XB6DpRu-qyv5OqJYhIEmeI3Qe1UttC_KzpXoBWbVudKDV9CE0p6ofXSgAL0ecWXtRLq-_0Fc7jpgUBZrqam1Kegg-ApMr78hSiTUCMxHgWpUKN7_6b26skb5WN_0GWObM78VwcVTyKQ7K4Axw_Iik9WglVk9QKreZ9lSNPWhI6DX1bb-Pl2gRDXKY1bw3t_3-FiYyzROsU-9IAJozqZs_m-J3bfkcJ01J8Eg21vEdK-9_4uHA1qfGU7aJr9APH4fc5S9AonGi9UeSEiqG3Bas997LqgN_Wd49UeSnfabQl54UewiQjaFThlNO5qQ9xQ7IuuGjkqAH6M9R_uIo\u0026s=sYV_pI54NwSfLryCVz3rI0f_jVICq4ymMAsq4mkp-AZ7fDouoneG3yMgJVtHJw9JVkk2ZCer__rp8fGp02TpFIpwZiiZKo4vaXxPI5ZUPr2gZi1p46OZgTEFXsUBaqMGB7RineKfk1PmI93Ty6fCv4-a83W6tAthKLP60RnH4EaMFaOrk-uDrcPKOtd6nUnTqCFA5mXhBkd_RMamscXjNRYJ2JY8Dl21ef2zvvMppXE7XJTgpzPDaafiJAcNZwKzh5ADnOObY3sPaLwJG59rrg-_Zr-b0RX4fIXlMfFxh3NNSUNoVrvxdWQIlOk9xJ45IzcPXfBjkpLikJ9tGRh3VA\u0026h=TtkLweqMUdwLQf-09AFmw0F0w9131rb3EiyC6Tb27Cg" ], + "x-ms-request-id": [ "92ad8321-7453-476b-99ff-b28b57cd2bc5" ], + "x-ms-correlation-request-id": [ "ddbf28fe-944e-4954-987c-52f72489b959" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKWEST:20240711T111914Z:ddbf28fe-944e-4954-987c-52f72489b959" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 15C1523885C2451AB89B7BC314B6F915 Ref B: AMS231022012051 Ref C: 2024-07-11T11:19:13Z" ], + "Date": [ "Thu, 11 Jul 2024 11:19:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1272" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"ocid\":null,\"listenerPort\":null,\"nodeCount\":null,\"storageSizeInGbs\":null,\"dataStorageSizeInTbs\":null,\"dbNodeStorageSizeInGbs\":null,\"memorySizeInGbs\":null,\"timeCreated\":null,\"lifecycleDetails\":null,\"timeZone\":null,\"zoneId\":null,\"hostname\":null,\"domain\":null,\"cpuCoreCount\":null,\"ocpuCount\":null,\"clusterName\":\"OFake_PowerShellTestVmCluster\",\"dataStoragePercentage\":null,\"isLocalBackupEnabled\":null,\"cloudExadataInfrastructureId\":null,\"isSparseDiskgroupEnabled\":null,\"systemVersion\":null,\"sshPublicKeys\":null,\"licenseModel\":null,\"diskRedundancy\":null,\"scanIpIds\":null,\"vipIds\":null,\"scanDnsName\":null,\"scanListenerPortTcp\":null,\"scanListenerPortTcpSsl\":null,\"scanDnsRecordId\":null,\"shape\":null,\"provisioningState\":\"Succeeded\",\"lifecycleState\":null,\"vnetId\":null,\"giVersion\":null,\"ociUrl\":null,\"subnetId\":null,\"dataCollectionOptions\":null,\"displayName\":null,\"iormConfigCache\":null,\"lastUpdateHistoryEntryId\":null,\"dbServers\":null,\"compartmentId\":null,\"subnetOcid\":null,\"nsgCidrs\":null,\"nsgUrl\":null},\"location\":null,\"tags\":null,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"type\":null,\"name\":\"OFake_PowerShellTestVmCluster\",\"systemData\":null}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Tests.ps1 new file mode 100644 index 000000000000..196adf3f623f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Add-AzOracleCloudVMClusterVM.Tests.ps1 @@ -0,0 +1,40 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Add-AzOracleCloudVMClusterVM')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Add-AzOracleCloudVMClusterVM.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Add-AzOracleCloudVMClusterVM' { + It 'AddExpanded' { + { + $dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $env.exaInfraName -ResourceGroupName $env.resourceGroup + # VM Cluster already contains the first 2 out of 3 VMs from the Exadata Infra + $dbServerOcid1 = $dbServerList[2].Ocid + $dbServersToAdd = @($dbServerOcid1) + + Add-AzOracleCloudVMClusterVM -NoWait -Cloudvmclustername $env.vmClusterName -ResourceGroupName $env.resourceGroup -DbServer $dbServersToAdd + } | Should -Not -Throw + } + + It 'AddViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'AddViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'AddViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/AzAdbs.Recording.json b/src/Oracle/Oracle.Autorest/test/AzAdbs.Recording.json new file mode 100644 index 000000000000..87e543a52bb4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzAdbs.Recording.json @@ -0,0 +1,1940 @@ +{ + "AzAdbs+[NoContext]+CreateAdbs+$PUT+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01", + "Content": "{\n \"location\": \"eastus\",\n \"properties\": {\n \"adminPassword\": \"PowerShellTestPass123\",\n \"dataBaseType\": \"Regular\",\n \"characterSet\": \"AL32UTF8\",\n \"computeCount\": 2,\n \"computeModel\": \"ECPU\",\n \"dataStorageSizeInGbs\": 32,\n \"dbVersion\": \"19c\",\n \"dbWorkload\": \"OLTP\",\n \"displayName\": \"OFakePowerShellTestAdbs\",\n \"licenseModel\": \"BringYourOwnLicense\",\n \"ncharacterSet\": \"AL16UTF16\",\n \"subnetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\n \"vnetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\"\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "745" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"b600e354-0000-0100-0000-6686bcaa0000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/5F2E0A5720F9A842A21283A0A96EE862/40CE9758CCDD381C48407347FBA32EA8" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ" ], + "x-ms-request-id": [ "076e1d63-25cc-4562-8e80-512cea8429be" ], + "x-ms-correlation-request-id": [ "a7d9c803-a5c5-4799-8c04-e8915317a56c" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151554Z:a7d9c803-a5c5-4799-8c04-e8915317a56c" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 02AF2A48077D408991FBE0886F62DA04 Ref B: AMS231022012021 Ref C: 2024-07-04T15:15:49Z" ], + "Date": [ "Thu, 04 Jul 2024 15:15:54 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2778" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"name\":\"OFakePowerShellTestAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T15:15:50.4761946Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T15:15:50.4761946Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":null,\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":32,\"dataStorageSizeInTbs\":null,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"inMemoryAreaInGbs\":null,\"nextLongTermBackupTimeStamp\":null,\"longTermBackupSchedule\":null,\"isAutoScalingEnabled\":null,\"isAutoScalingForStorageEnabled\":null,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":null,\"isPreview\":null,\"licenseModel\":\"BringYourOwnLicense\",\"lifecycleDetails\":null,\"provisioningState\":\"Accepted\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":null,\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":\"Provisioning\",\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"ocid\":null,\"backupRetentionPeriodInDays\":null}}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39002cf8-0000-0100-0000-6686bcb60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-request-id": [ "5be81657-f1e9-4665-ab54-7bbd60a753d8" ], + "x-ms-correlation-request-id": [ "90ca6801-711e-46b2-811c-87fac0ede4d6" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151625Z:90ca6801-711e-46b2-811c-87fac0ede4d6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 54564705453643D7B11B7E9F25577081 Ref B: AMS231022012021 Ref C: 2024-07-04T15:16:25Z" ], + "Date": [ "Thu, 04 Jul 2024 15:16:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:16:05.641Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39002cf8-0000-0100-0000-6686bcb60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-request-id": [ "c48bc3e8-f019-4e88-8515-a7a135272044" ], + "x-ms-correlation-request-id": [ "1ebdb8bb-eaf4-445c-9872-8b798079a226" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151655Z:1ebdb8bb-eaf4-445c-9872-8b798079a226" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 951DED47B5EB45378330E4BB7DC17F33 Ref B: AMS231022012021 Ref C: 2024-07-04T15:16:55Z" ], + "Date": [ "Thu, 04 Jul 2024 15:16:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:16:05.641Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900e5f9-0000-0100-0000-6686bcf60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "f91133db-f18a-43c5-a07f-87c1f5916bc2" ], + "x-ms-correlation-request-id": [ "35b819c1-29f5-46cc-8633-4c402c94f5cf" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151726Z:35b819c1-29f5-46cc-8633-4c402c94f5cf" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 92B5B0304F3044739EBA07A3162AD59E Ref B: AMS231022012021 Ref C: 2024-07-04T15:17:26Z" ], + "Date": [ "Thu, 04 Jul 2024 15:17:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:17:10.618Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900e5f9-0000-0100-0000-6686bcf60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "c272cedd-4ff2-4946-9fe4-b7bc2176f3c5" ], + "x-ms-correlation-request-id": [ "162a071b-9edf-4f7d-88cd-dc51fe976d72" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151757Z:162a071b-9edf-4f7d-88cd-dc51fe976d72" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E99B92A692774B43AA8EC868276F73CB Ref B: AMS231022012021 Ref C: 2024-07-04T15:17:56Z" ], + "Date": [ "Thu, 04 Jul 2024 15:17:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:17:10.618Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900aafb-0000-0100-0000-6686bd3a0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "252dc660-fbc4-439e-b6fc-4d16c9114f24" ], + "x-ms-correlation-request-id": [ "547d6eea-8172-4e52-9abd-d13b831f8d2e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151827Z:547d6eea-8172-4e52-9abd-d13b831f8d2e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8A595399C6DF4600B03605B0449B7597 Ref B: AMS231022012021 Ref C: 2024-07-04T15:18:27Z" ], + "Date": [ "Thu, 04 Jul 2024 15:18:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:18:18.211Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900aafb-0000-0100-0000-6686bd3a0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "fb8546c0-f49b-4ce6-a04b-8419740ceb07" ], + "x-ms-correlation-request-id": [ "307fa6e4-1b46-4acb-959c-2cec3a91d452" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151858Z:307fa6e4-1b46-4acb-959c-2cec3a91d452" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 01C5BC0DF8D64C2C8AF6EA00A4957D4E Ref B: AMS231022012021 Ref C: 2024-07-04T15:18:58Z" ], + "Date": [ "Thu, 04 Jul 2024 15:18:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:18:18.211Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39000efe-0000-0100-0000-6686bd7e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "c9b6b3dd-c65d-479e-ac44-ef3199ce928d" ], + "x-ms-correlation-request-id": [ "56d1aefa-d8b9-4110-a393-43b470518eb7" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151929Z:56d1aefa-d8b9-4110-a393-43b470518eb7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CDD8726CDEF942AC9D0FD08D9049C992 Ref B: AMS231022012021 Ref C: 2024-07-04T15:19:29Z" ], + "Date": [ "Thu, 04 Jul 2024 15:19:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:19:26.044Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39000efe-0000-0100-0000-6686bd7e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "7f4e1139-0e7a-46fc-b5b3-0e66b836dacb" ], + "x-ms-correlation-request-id": [ "82630019-a70d-458d-abf6-dd6d0946ccae" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T151959Z:82630019-a70d-458d-abf6-dd6d0946ccae" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 926A21D7870D4C66BA2868A2CFE7D5F4 Ref B: AMS231022012021 Ref C: 2024-07-04T15:19:59Z" ], + "Date": [ "Thu, 04 Jul 2024 15:19:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:19:26.044Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+10": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39000efe-0000-0100-0000-6686bd7e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "45005183-0636-4e34-ae58-b65253081e57" ], + "x-ms-correlation-request-id": [ "4ed1b428-523f-45e3-a4b6-205ef94aa798" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152030Z:4ed1b428-523f-45e3-a4b6-205ef94aa798" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E806103101FE4A4DAA9B6A84A9E5FACB Ref B: AMS231022012021 Ref C: 2024-07-04T15:20:30Z" ], + "Date": [ "Thu, 04 Jul 2024 15:20:30 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:19:26.044Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+11": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a006000-0000-0100-0000-6686bdc00000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "c83e283d-be68-4a77-8669-1dfe90a90495" ], + "x-ms-correlation-request-id": [ "755daabb-3ce5-42de-b26a-08c7e702a66b" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152101Z:755daabb-3ce5-42de-b26a-08c7e702a66b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7F4A199008F24E15B5762FE8473B749A Ref B: AMS231022012021 Ref C: 2024-07-04T15:21:01Z" ], + "Date": [ "Thu, 04 Jul 2024 15:21:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:20:31.884Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a006000-0000-0100-0000-6686bdc00000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "a7bf9235-8414-44d4-8eb1-ad50ddd9c956" ], + "x-ms-correlation-request-id": [ "d2de1e9e-5f28-419d-84f4-e50f606992d4" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152131Z:d2de1e9e-5f28-419d-84f4-e50f606992d4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DB00D09034EB42C0A391FDCE35394C60 Ref B: AMS231022012021 Ref C: 2024-07-04T15:21:31Z" ], + "Date": [ "Thu, 04 Jul 2024 15:21:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:20:31.884Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+13": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a008e02-0000-0100-0000-6686be050000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "5afa8291-579d-4c8f-9927-3f012a7129d2" ], + "x-ms-correlation-request-id": [ "9955ba5d-4b0a-4b9f-8a9a-f2745dc47ae6" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152202Z:9955ba5d-4b0a-4b9f-8a9a-f2745dc47ae6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5C5A1FE3CD574F3480E1667D15DABA0A Ref B: AMS231022012021 Ref C: 2024-07-04T15:22:02Z" ], + "Date": [ "Thu, 04 Jul 2024 15:22:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:21:40.722Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+14": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a008e02-0000-0100-0000-6686be050000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "73a809be-f096-4ecf-b4ef-2873a96bb0c0" ], + "x-ms-correlation-request-id": [ "f604d3a1-d2b3-42a1-b7c1-6cfb6630b926" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152233Z:f604d3a1-d2b3-42a1-b7c1-6cfb6630b926" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4CA8F99882CC4F899A511A3FCB7C2E86 Ref B: AMS231022012021 Ref C: 2024-07-04T15:22:32Z" ], + "Date": [ "Thu, 04 Jul 2024 15:22:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:21:40.722Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+15": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00a004-0000-0100-0000-6686be460000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "3f38922a-4889-46ff-b9c9-736c9eec6935" ], + "x-ms-correlation-request-id": [ "481f08d9-3029-4d28-8094-1b12951878aa" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152303Z:481f08d9-3029-4d28-8094-1b12951878aa" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3C0E2A634CE745F2BA5FD0DF56DA2D6F Ref B: AMS231022012021 Ref C: 2024-07-04T15:23:03Z" ], + "Date": [ "Thu, 04 Jul 2024 15:23:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:22:45.901Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+16": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00a004-0000-0100-0000-6686be460000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "7d24592e-6369-4447-a88b-ddd52803eb9f" ], + "x-ms-correlation-request-id": [ "58eaffb0-89db-423d-8c1a-fa845bedaea0" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152334Z:58eaffb0-89db-423d-8c1a-fa845bedaea0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1E6DA0FD291444229B93E89879572422 Ref B: AMS231022012021 Ref C: 2024-07-04T15:23:33Z" ], + "Date": [ "Thu, 04 Jul 2024 15:23:33 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:22:45.901Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+17": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00a506-0000-0100-0000-6686be8e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "28cd592f-00c6-4ba6-a58c-e00ff47a5569" ], + "x-ms-correlation-request-id": [ "ca313e98-bb25-4237-9eda-0f2cf940bd7d" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152404Z:ca313e98-bb25-4237-9eda-0f2cf940bd7d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BC3953122ACB41D38AAB5268E6CDCDE4 Ref B: AMS231022012021 Ref C: 2024-07-04T15:24:04Z" ], + "Date": [ "Thu, 04 Jul 2024 15:24:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:23:58.468Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+18": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00a506-0000-0100-0000-6686be8e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "abf0529b-acbd-4d8b-a322-443ec242c3d3" ], + "x-ms-correlation-request-id": [ "6062d331-6f69-4cf4-b6d5-f2a724cdf831" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152435Z:6062d331-6f69-4cf4-b6d5-f2a724cdf831" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 88A5849C53FF4034854D04BC1E8F09EE Ref B: AMS231022012021 Ref C: 2024-07-04T15:24:35Z" ], + "Date": [ "Thu, 04 Jul 2024 15:24:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:23:58.468Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+19": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00a506-0000-0100-0000-6686be8e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "d0e2d6cd-0e41-4553-a203-2d5592d8f335" ], + "x-ms-correlation-request-id": [ "2e5bba0b-8457-4c59-9a04-74c3006c7aa1" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152506Z:2e5bba0b-8457-4c59-9a04-74c3006c7aa1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B7C2DB33C6F840AEAFAEA97EAA2CED69 Ref B: AMS231022012021 Ref C: 2024-07-04T15:25:05Z" ], + "Date": [ "Thu, 04 Jul 2024 15:25:05 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:23:58.468Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+20": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00bb08-0000-0100-0000-6686bed60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "1b58ba78-8eff-42c2-9ccc-7f55c3379b43" ], + "x-ms-correlation-request-id": [ "dc73f64f-e26d-4f01-a36e-3be2781131ce" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152536Z:dc73f64f-e26d-4f01-a36e-3be2781131ce" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DFE4E90EFF4A49648F2382776B161ED0 Ref B: AMS231022012021 Ref C: 2024-07-04T15:25:36Z" ], + "Date": [ "Thu, 04 Jul 2024 15:25:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:25:09.755Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+21": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00bb08-0000-0100-0000-6686bed60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "a463a3df-1f4c-485d-8d72-bd6fdd907c80" ], + "x-ms-correlation-request-id": [ "74ca9cf9-39a4-4c1d-8b0a-3e57247f377d" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152607Z:74ca9cf9-39a4-4c1d-8b0a-3e57247f377d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5BBB67A8C1F14BF7A4000D0C51114813 Ref B: AMS231022012021 Ref C: 2024-07-04T15:26:07Z" ], + "Date": [ "Thu, 04 Jul 2024 15:26:06 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:25:09.755Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+22": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00c00a-0000-0100-0000-6686bf190000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "299eed4a-336c-4beb-977d-4065c62f5675" ], + "x-ms-correlation-request-id": [ "c5be92f2-5d1a-47b6-be07-a71f16d1f638" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152637Z:c5be92f2-5d1a-47b6-be07-a71f16d1f638" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0538C5BFD07F4E94A460DB05BF98282A Ref B: AMS231022012021 Ref C: 2024-07-04T15:26:37Z" ], + "Date": [ "Thu, 04 Jul 2024 15:26:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:26:15.931Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+23": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00c00a-0000-0100-0000-6686bf190000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "53c5a410-168b-424e-88c7-f2a0a575467f" ], + "x-ms-correlation-request-id": [ "543075d0-471a-4321-be25-908e8c0157ba" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152708Z:543075d0-471a-4321-be25-908e8c0157ba" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FA54BB7963D24087B174C0E5202A18CF Ref B: AMS231022012021 Ref C: 2024-07-04T15:27:08Z" ], + "Date": [ "Thu, 04 Jul 2024 15:27:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:26:15.931Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+24": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00b50c-0000-0100-0000-6686bf5c0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "d31bed07-8c8b-45cb-9b92-9b652562569a" ], + "x-ms-correlation-request-id": [ "97b6d837-1ec5-4e19-b705-9e135188ee0e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152739Z:97b6d837-1ec5-4e19-b705-9e135188ee0e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7540F66127CC41FAA527B7D26AB90E68 Ref B: AMS231022012021 Ref C: 2024-07-04T15:27:38Z" ], + "Date": [ "Thu, 04 Jul 2024 15:27:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:27:24.114Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+25": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00b50c-0000-0100-0000-6686bf5c0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "6192c362-9ddf-495b-b1a5-02a6e2ea2076" ], + "x-ms-correlation-request-id": [ "79bf247c-abb6-47be-b62a-4d446648848e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152809Z:79bf247c-abb6-47be-b62a-4d446648848e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 91539EB9F0774895998FF432A98DF434 Ref B: AMS231022012021 Ref C: 2024-07-04T15:28:09Z" ], + "Date": [ "Thu, 04 Jul 2024 15:28:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:27:24.114Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+26": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00b50c-0000-0100-0000-6686bf5c0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "68bffb47-5313-4e1e-a1ac-848908d9e3aa" ], + "x-ms-correlation-request-id": [ "0b84ed6e-5d9b-408f-bbeb-4f3cd3f03c1e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152840Z:0b84ed6e-5d9b-408f-bbeb-4f3cd3f03c1e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5A2BD2D8F67A4BFE8639CC55A2E8D9C2 Ref B: AMS231022012021 Ref C: 2024-07-04T15:28:39Z" ], + "Date": [ "Thu, 04 Jul 2024 15:28:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:27:24.114Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+27": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00b50c-0000-0100-0000-6686bf5c0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "b36b8e2f-2165-42c2-8cfd-65a652511d9a" ], + "x-ms-correlation-request-id": [ "478b9986-c773-478c-920b-a36e83824b5e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152910Z:478b9986-c773-478c-920b-a36e83824b5e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9AE1C84980584B40B318EB7217F632FE Ref B: AMS231022012021 Ref C: 2024-07-04T15:29:10Z" ], + "Date": [ "Thu, 04 Jul 2024 15:29:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:27:24.114Z\",\"percentComplete\":50.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+28": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "18f003bd-8bc4-4012-afae-8abc7495949b" ], + "x-ms-correlation-request-id": [ "514470aa-6c04-4239-b9f4-666fba337466" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T152941Z:514470aa-6c04-4239-b9f4-666fba337466" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6C9978DCBD694AA793790BE10A2F827D Ref B: AMS231022012021 Ref C: 2024-07-04T15:29:41Z" ], + "Date": [ "Thu, 04 Jul 2024 15:29:40 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+29": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "7e811aab-c9e9-4e64-9950-ffedfdd72fb9" ], + "x-ms-correlation-request-id": [ "f3ae0186-f196-49ca-a8fb-3d31aab15414" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153011Z:f3ae0186-f196-49ca-a8fb-3d31aab15414" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6D1A42E848194FA4A9650395CD4CED92 Ref B: AMS231022012021 Ref C: 2024-07-04T15:30:11Z" ], + "Date": [ "Thu, 04 Jul 2024 15:30:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+30": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "0ab57f02-80cc-47b5-914d-9311e40b8ca9" ], + "x-ms-correlation-request-id": [ "143bdc61-2999-4f7f-9a36-3b0c57f67efd" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153042Z:143bdc61-2999-4f7f-9a36-3b0c57f67efd" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 3F9CB39AC7AE44459D48E73E10FF9DF5 Ref B: AMS231022012021 Ref C: 2024-07-04T15:30:42Z" ], + "Date": [ "Thu, 04 Jul 2024 15:30:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+31": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "31" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "dc0a0ada-c61f-4524-943b-88d816fd8b9b" ], + "x-ms-correlation-request-id": [ "3f6f69e9-bd50-4766-8aa6-eaf07a3817a0" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153113Z:3f6f69e9-bd50-4766-8aa6-eaf07a3817a0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 480A26FAB32542A09038CD7C1E8234C6 Ref B: AMS231022012021 Ref C: 2024-07-04T15:31:13Z" ], + "Date": [ "Thu, 04 Jul 2024 15:31:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+32": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "32" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "f7b34d2e-55a1-44ab-be49-1eba512a6621" ], + "x-ms-correlation-request-id": [ "b73ca8c9-a7a3-4d98-b1c8-8d7d1d03d3da" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153143Z:b73ca8c9-a7a3-4d98-b1c8-8d7d1d03d3da" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7292BE2732E3457EA2D353E313AE6321 Ref B: AMS231022012021 Ref C: 2024-07-04T15:31:43Z" ], + "Date": [ "Thu, 04 Jul 2024 15:31:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+33": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "a92bd74f-b2c7-4432-8a0d-c131a0b1831c" ], + "x-ms-correlation-request-id": [ "5952b8af-362c-4eb6-83b2-f7d5d0c9840a" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153214Z:5952b8af-362c-4eb6-83b2-f7d5d0c9840a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 12216A90AA2F44A1A268DD7C848E00B5 Ref B: AMS231022012021 Ref C: 2024-07-04T15:32:14Z" ], + "Date": [ "Thu, 04 Jul 2024 15:32:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+34": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "4b09410f-219a-42c8-9c38-a779132d7e3c" ], + "x-ms-correlation-request-id": [ "07387584-5e37-446d-be2c-4652f42f3802" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153245Z:07387584-5e37-446d-be2c-4652f42f3802" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 078ED8BBEBFF497B91FC84B8B5A8ED97 Ref B: AMS231022012021 Ref C: 2024-07-04T15:32:44Z" ], + "Date": [ "Thu, 04 Jul 2024 15:32:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+35": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "9547974f-dc62-4f50-8826-312dd9343f7e" ], + "x-ms-correlation-request-id": [ "4b46f72c-33d5-4db2-8b19-97575deac72e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153315Z:4b46f72c-33d5-4db2-8b19-97575deac72e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7BD6973E44FC479A91C74C0106800DF5 Ref B: AMS231022012021 Ref C: 2024-07-04T15:33:15Z" ], + "Date": [ "Thu, 04 Jul 2024 15:33:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+36": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "233b281b-3a86-4b56-af1d-2bdf2aeb883d" ], + "x-ms-correlation-request-id": [ "373eb7bd-ca9a-43ac-aa89-85e9c6bc68c7" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153346Z:373eb7bd-ca9a-43ac-aa89-85e9c6bc68c7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7A12B1520EB44990AD2C7027C17F27D0 Ref B: AMS231022012021 Ref C: 2024-07-04T15:33:46Z" ], + "Date": [ "Thu, 04 Jul 2024 15:33:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+37": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "37" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00d60f-0000-0100-0000-6686bfc80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "59b0151e-3268-4077-98a8-e71b9b0273c1" ], + "x-ms-correlation-request-id": [ "4e5d5974-e445-4412-822e-1fcb925dea12" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153417Z:4e5d5974-e445-4412-822e-1fcb925dea12" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 94FD18F36DEF44B9B4DB609F1AFB8AD8 Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:16Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "630" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:29:11.973Z\",\"percentComplete\":85.0}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ+38": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557029548512372\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ik-DR4fujlSpOOlsSFXDVVik-ozBY2KxeMUIKZCTKb4lG0ezKjH-wMWSiz7gozgdkBm2KjIjB8Au0BxKcAvU-85IDmlpvAyNnthdaAE3PdZaS2WP5ZGPsdC-J8czLBv7eiucKCAR3LDW2fkjIRcyYLDMhZF2BWSc_-z-bda-jRaRC8X1X5RLcuQTR3Q5sfbotyyGJuIn7RDCpPGXryiiNG69JkjONpd18THscqj9TfsKMDAYlsb9GV3NNn4WftEFN8FF9xXTmvArbFIdjqxyhtj2h55bCoLnXS4u7Khe4PFSBIfIjRm4sxqKQiJ9upRIG62NaR1OeW89EzOhAmIKEA\u0026h=o4pP51dkIVeNDiwIjXSsXBffwBPhRzrpUB7L9JowkjQ", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3a00711b-0000-0100-0000-6686c1140000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "92571dd8-4b43-40e2-8687-768b857c1f16" ], + "x-ms-correlation-request-id": [ "1f9bfd59-ffeb-44d2-8556-761ee4fa0d13" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153447Z:1f9bfd59-ffeb-44d2-8556-761ee4fa0d13" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 63C8AA41EF384AE4A819C5C02A0DFECB Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:47Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "650" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"076e1d63-25cc-4562-8e80-512cea8429be*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Succeeded\",\"startTime\":\"2024-07-04T15:15:54.3030058Z\",\"endTime\":\"2024-07-04T15:34:44.0693469Z\",\"percentComplete\":100.0,\"properties\":null}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+CreateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01+39": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "48fc1a90-945a-4334-b05f-fd658b626e93" ], + "CommandName": [ "New-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "New-AzOracleAutonomousDatabase_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"b6005eac-0000-0100-0000-6686c1140000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "23fd6231-3d89-40bf-97fb-de92c1756f1e" ], + "x-ms-correlation-request-id": [ "e9cac2b9-5d20-4f42-9832-5cdfda9a6a22" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153448Z:e9cac2b9-5d20-4f42-9832-5cdfda9a6a22" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 61FFAA7411204C57AFA2F9098BF79FE8 Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:47Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7815" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"name\":\"OFakePowerShellTestAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T15:15:50.4761946Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:34:44.8861855Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.003295600414276123,\"allocatedStorageSizeInTbs\":0.0078125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":32,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"bqv0jquh.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.252\",\"privateEndpointLabel\":\"bqv0jquh\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"timeCreated\":\"2024-07-04T15:25:09.397Z\",\"timeLocalDataGuardEnabled\":\"Thu Jul 04 15:25:34 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa\",\"backupRetentionPeriodInDays\":60}}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+GetAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "40" ], + "x-ms-client-request-id": [ "efa5c5db-f0a0-4e70-9375-f4fec79bdf59" ], + "CommandName": [ "Get-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "Get-AzOracleAutonomousDatabase_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"b6005eac-0000-0100-0000-6686c1140000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "841d7ae5-3bf8-4d41-b74c-da2c0fbaea53" ], + "x-ms-correlation-request-id": [ "54ddbfa2-26db-4ab1-a010-0899f3c234ad" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153449Z:54ddbfa2-26db-4ab1-a010-0899f3c234ad" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 876D127D71674E0CB753A5D0ECACC19E Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:48Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7815" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"name\":\"OFakePowerShellTestAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T15:15:50.4761946Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:34:44.8861855Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.003295600414276123,\"allocatedStorageSizeInTbs\":0.0078125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":32,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"bqv0jquh.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.252\",\"privateEndpointLabel\":\"bqv0jquh\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"timeCreated\":\"2024-07-04T15:25:09.397Z\",\"timeLocalDataGuardEnabled\":\"Thu Jul 04 15:25:34 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa\",\"backupRetentionPeriodInDays\":60}}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+ListAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/autonomousDatabases?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/autonomousDatabases?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "41" ], + "x-ms-client-request-id": [ "d183a3c6-7a12-43a7-beeb-f4b3b8fc9663" ], + "CommandName": [ "Get-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "Get-AzOracleAutonomousDatabase_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-original-request-ids": [ "01326f65-9d31-417c-9d8e-0045f2f26c66", "d21fc181-917a-4b50-a404-fe1d2bcb7204" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-request-id": [ "aded3bdb-ff3b-4a5c-963c-cb721fc19479" ], + "x-ms-correlation-request-id": [ "aded3bdb-ff3b-4a5c-963c-cb721fc19479" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153450Z:aded3bdb-ff3b-4a5c-963c-cb721fc19479" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 23C455CC1E5C484CBA5F7B427922EA1C Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:49Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "327832" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testCpg/providers/Oracle.Database/autonomousDatabases/testAdbsSc6NL\",\"name\":\"testAdbsSc6NL\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-03-12T19:36:27.3061231Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:39.679406Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_testadbssc6nl_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_testadbssc6nl_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_testadbssc6nl_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"testadbssc6nl_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ratiaf1n.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_testadbssc6nl_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"testadbssc6nl_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ratiaf1n.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_testadbssc6nl_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"testadbssc6nl_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ratiaf1n.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_testadbssc6nl_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"testadbssc6nl_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ratiaf1n.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_testadbssc6nl_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"testadbssc6nl_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ratiaf1n.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_testadbssc6nl_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"testadbssc6nl_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ratiaf1n.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_testadbssc6nl_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://ratiaf1n.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://ratiaf1n.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://ratiaf1n.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://ratiaf1n.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://ratiaf1n.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://ratiaf1n.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"testAdbsSc6NL\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqas3xb7tw6x3ungpqf3henphmc6mvjupfqhsyqd53vthrq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"ratiaf1n.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.3.174\",\"privateEndpointLabel\":\"ratiaf1n\",\"lifecycleState\":\"Terminating\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testCpg/providers/Microsoft.Network/virtualNetworks/testCpgVnet/subnets/cleanSubnet\",\"timeCreated\":\"2024-03-12T19:57:11.263Z\",\"timeMaintenanceBegin\":\"2024-03-17T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-03-17T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testCpg/providers/Microsoft.Network/virtualNetworks/testCpgVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqas3xb7tw6x3ungpqf3henphmc6mvjupfqhsyqd53vthrq\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":0.0029081106185913086,\"usedDataStorageSizeInTbs\":1,\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error. Refer to JobId (no job yet) and WorkRequestId 535ada9f-bcdc-49fc-80b1-df140db7ab86 when opening a Service Request at My Oracle Support.\",\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"timeLocalDataGuardEnabled\":\"Tue Mar 12 19:57:33 UTC 2024\",\"allocatedStorageSizeInTbs\":0.0146484375}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Oracle.Database/autonomousDatabases/ADBSCriticalNoDELETE\",\"name\":\"ADBSCriticalNoDELETE\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-03-15T23:31:08.653886Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-15T17:02:49.3869426Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbscriticalnodelete_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbscriticalnodelete_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbscriticalnodelete_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"adbscriticalnodelete_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yp3am8vv.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbscriticalnodelete_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbscriticalnodelete_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yp3am8vv.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbscriticalnodelete_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbscriticalnodelete_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yp3am8vv.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbscriticalnodelete_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"adbscriticalnodelete_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yp3am8vv.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbscriticalnodelete_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbscriticalnodelete_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yp3am8vv.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbscriticalnodelete_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbscriticalnodelete_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yp3am8vv.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbscriticalnodelete_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://yp3am8vv.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://yp3am8vv.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://yp3am8vv.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://yp3am8vv.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://yp3am8vv.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://yp3am8vv.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"ADBSCriticalNoDELETE\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa3funtooqizsgue5vuxkqcapt32mvx2wwbvk4ywwqauna?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"yp3am8vv.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.204\",\"privateEndpointLabel\":\"yp3am8vv\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Microsoft.Network/virtualNetworks/drVnet/subnets/adbsTest\",\"timeCreated\":\"2024-03-15T23:35:33.791Z\",\"timeMaintenanceBegin\":\"2024-05-19T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-19T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Microsoft.Network/virtualNetworks/drVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa3funtooqizsgue5vuxkqcapt32mvx2wwbvk4ywwqauna\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":0.0042414665222167969,\"usedDataStorageSizeInTbs\":1,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"timeDataGuardRoleChanged\":\"2024-04-23T07:11:38.82Z\",\"timeDisasterRecoveryRoleChanged\":\"2024-04-23T07:11:38.82Z\",\"lifecycleDetails\":\"The switchover operation was unsuccessful. Please contact Oracle Support for assistance.\"},\"timeLocalDataGuardEnabled\":\"Fri Mar 15 23:35:54 UTC 2024\",\"timeOfLastSwitchover\":\"Tue Apr 23 07:11:38 UTC 2024\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error. Refer to JobId a75f8d44-d4d5-4d55-9559-bbadd5a92000 and WorkRequestId e5aab69d-5a0f-45d1-a9c9-3f91d5f6f3cb when opening a Service Request at My Oracle Support.\",\"allocatedStorageSizeInTbs\":0.0263671875}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Oracle.Database/autonomousDatabases/ADBSMeet3NoDELETE\",\"name\":\"ADBSMeet3NoDELETE\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-03-19T15:12:58.9171042Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-15T17:02:50.37144Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":8.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsmeet3nodelete_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsmeet3nodelete_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsmeet3nodelete_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"adbsmeet3nodelete_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bvy6gda8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsmeet3nodelete_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbsmeet3nodelete_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bvy6gda8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsmeet3nodelete_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbsmeet3nodelete_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bvy6gda8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsmeet3nodelete_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"adbsmeet3nodelete_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bvy6gda8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsmeet3nodelete_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbsmeet3nodelete_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bvy6gda8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsmeet3nodelete_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbsmeet3nodelete_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bvy6gda8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsmeet3nodelete_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://bvy6gda8.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://bvy6gda8.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://bvy6gda8.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://bvy6gda8.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://bvy6gda8.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://bvy6gda8.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":2048,\"dataStorageSizeInTbs\":2,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"ADBSMeet3NoDELETE\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":true,\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqak7hysftaal5chzlkqwsjthhgz5wx7umlq6ffazwdmy7q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"bvy6gda8.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.253\",\"privateEndpointLabel\":\"bvy6gda8\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Microsoft.Network/virtualNetworks/givan-vpn-eus/subnets/delegate\",\"timeCreated\":\"2024-03-19T15:29:48.599Z\",\"timeMaintenanceBegin\":\"2024-05-19T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-19T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Microsoft.Network/virtualNetworks/givan-vpn-eus\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqak7hysftaal5chzlkqwsjthhgz5wx7umlq6ffazwdmy7q\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":0.0055461525917053223,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"timeLocalDataGuardEnabled\":\"Tue Mar 19 15:30:17 UTC 2024\",\"allocatedStorageSizeInTbs\":0.0283203125}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IAD/providers/Oracle.Database/autonomousDatabases/drTest04\",\"name\":\"drTest04\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-08T15:26:00.3270162Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-09T16:03:53.0005492Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_drtest04_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_drtest04_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_drtest04_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"drtest04_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=lptvjlxp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtest04_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"drtest04_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=lptvjlxp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtest04_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"drtest04_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=lptvjlxp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtest04_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"drtest04_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=lptvjlxp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtest04_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"drtest04_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=lptvjlxp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtest04_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"drtest04_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=lptvjlxp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtest04_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://lptvjlxp.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://lptvjlxp.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://lptvjlxp.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://lptvjlxp.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://lptvjlxp.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://lptvjlxp.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"drTest04\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":true,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"Adg\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"timeDataGuardRoleChanged\":\"2024-04-09T15:26:13.006Z\",\"timeDisasterRecoveryRoleChanged\":\"2024-04-09T15:26:13.006Z\",\"lagTimeInSeconds\":63},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"lptvjlxp.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.25.1.157\",\"privateEndpointLabel\":\"lptvjlxp\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IAD/providers/Microsoft.Network/virtualNetworks/drTest02/subnets/default\",\"timeCreated\":\"2024-04-08T15:38:02.463Z\",\"timeLocalDataGuardEnabled\":\"Mon Apr 08 20:19:26 UTC 2024\",\"timeMaintenanceBegin\":\"2024-04-14T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-04-14T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IAD/providers/Microsoft.Network/virtualNetworks/drTest02\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqazxpgpdhdgunt4zkude36vubibw3fyorvwtqf5rtjqvza\",\"backupRetentionPeriodInDays\":60,\"timeOfLastSwitchover\":\"Tue Apr 09 15:26:13 UTC 2024\",\"actualUsedDataStorageSizeInTbs\":1,\"usedDataStorageSizeInTbs\":1,\"localAdgAutoFailoverMaxDataLossLimit\":35,\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqazxpgpdhdgunt4zkude36vubibw3fyorvwtqf5rtjqvza?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBADG9thApril\",\"name\":\"DBADG9thApril\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-09T01:10:40.1421119Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-24T23:47:25.2713422Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbadg9thapril_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbadg9thapril_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbadg9thapril_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbadg9thapril_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbadg9thapril_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbadg9thapril_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dbadg9thapril_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dbadg9thapril_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbadg9thapril_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbadg9thapril_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbadg9thapril_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dbadg9thapril_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dbadg9thapril_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qd4cywep.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadg9thapril_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://qd4cywep.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://qd4cywep.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://qd4cywep.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://qd4cywep.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://qd4cywep.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://qd4cywep.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"DBADG9thApril\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"lagTimeInSeconds\":57,\"timeDataGuardRoleChanged\":\"2024-04-19T18:07:45.395Z\",\"timeDisasterRecoveryRoleChanged\":\"2024-04-19T18:07:45.395Z\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"qd4cywep.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.40\",\"privateEndpointLabel\":\"qd4cywep\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet/subnets/delegatedSubnet\",\"timeCreated\":\"2024-04-09T01:16:33.601Z\",\"timeLocalDataGuardEnabled\":\"Fri Apr 19 17:15:19 UTC 2024\",\"timeMaintenanceBegin\":\"2024-04-28T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-04-28T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa24wr5bdlfiannerljtnpcojpwbitirlqkwirkrlqgmrq\",\"backupRetentionPeriodInDays\":60,\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa24wr5bdlfiannerljtnpcojpwbitirlqkwirkrlqgmrq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"localAdgAutoFailoverMaxDataLossLimit\":183,\"timeOfLastSwitchover\":\"Fri Apr 19 18:07:45 UTC 2024\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/PDB12April\",\"name\":\"PDB12April\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-12T11:16:48.812983Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-19T17:18:12.7912812Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdb12april_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdb12april_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdb12april_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"pdb12april_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=spiahejc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdb12april_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"pdb12april_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=spiahejc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdb12april_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"pdb12april_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=spiahejc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdb12april_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"pdb12april_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=spiahejc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdb12april_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"pdb12april_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=spiahejc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdb12april_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"pdb12april_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=spiahejc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdb12april_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://spiahejc.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://spiahejc.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://spiahejc.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://spiahejc.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://spiahejc.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://spiahejc.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"PDB12April\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqahflvy5n7iy44nkbvpaarnlaza2cqe4umyoiqatna7k3q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"spiahejc.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.52\",\"privateEndpointLabel\":\"spiahejc\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet/subnets/delegatedSubnet\",\"timeCreated\":\"2024-04-12T11:27:05.718Z\",\"timeLocalDataGuardEnabled\":\"Fri Apr 12 11:27:26 UTC 2024\",\"timeMaintenanceBegin\":\"2024-04-21T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-04-21T17:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqahflvy5n7iy44nkbvpaarnlaza2cqe4umyoiqatna7k3q\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":1,\"usedDataStorageSizeInTbs\":1,\"lifecycleDetails\":\"The Data Safe operation on the Autonomous Database failed due to an unknown error. Refer to WorkRequestId 7c011f7c-cead-4778-9587-9701dfa085d1 when opening a Service Request with My Oracle Support.\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/CustomerContactPDB1\",\"name\":\"CustomerContactPDB1\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-15T15:19:34.1277597Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-30T12:47:46.8096665Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_customercontactpdb1_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_customercontactpdb1_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_customercontactpdb1_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"customercontactpdb1_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"customercontactpdb1_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"customercontactpdb1_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"customercontactpdb1_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"customercontactpdb1_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"customercontactpdb1_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"customercontactpdb1_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"customercontactpdb1_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"customercontactpdb1_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"customercontactpdb1_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=facpvubp.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb1_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://facpvubp.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://facpvubp.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://facpvubp.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://facpvubp.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://facpvubp.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://facpvubp.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"customerContacts\":[{\"email\":\"example@oracle.com\"}],\"dataStorageSizeInGbs\":25,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"CustomerContactPDB1\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqakkz4kcgj5qvrxdbr4hueflxgtkj5b7w2hza6tsjt7pzq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"facpvubp.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.18\",\"privateEndpointLabel\":\"facpvubp\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet/subnets/delegatedSubnet\",\"timeCreated\":\"2024-04-15T15:23:37.836Z\",\"timeLocalDataGuardEnabled\":\"Mon Apr 15 15:24:06 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-05T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-05T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqakkz4kcgj5qvrxdbr4hueflxgtkj5b7w2hza6tsjt7pzq\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":1,\"usedDataStorageSizeInTbs\":1}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/CustomerContactPDB2\",\"name\":\"CustomerContactPDB2\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-15T15:24:36.2617106Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-30T12:32:36.732094Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_customercontactpdb2_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_customercontactpdb2_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_customercontactpdb2_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"customercontactpdb2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"customercontactpdb2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"customercontactpdb2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"customercontactpdb2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"customercontactpdb2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"customercontactpdb2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"customercontactpdb2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"customercontactpdb2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"customercontactpdb2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"customercontactpdb2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=guvuor35.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_customercontactpdb2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://guvuor35.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://guvuor35.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://guvuor35.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://guvuor35.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://guvuor35.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://guvuor35.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"customerContacts\":[{\"email\":\"example@oracle.com\"}],\"dataStorageSizeInGbs\":25,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"CustomerContactPDB2\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqafamb3cnidtatldqtkas2ysiyyhhes27pjdc7bj7fsama?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"guvuor35.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.251\",\"privateEndpointLabel\":\"guvuor35\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet/subnets/delegatedSubnet\",\"timeCreated\":\"2024-04-15T15:30:58.41Z\",\"timeLocalDataGuardEnabled\":\"Mon Apr 15 15:31:25 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-05T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-05T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAOCIUIVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqafamb3cnidtatldqtkas2ysiyyhhes27pjdc7bj7fsama\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":1,\"usedDataStorageSizeInTbs\":1}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eamonterraformtest500/providers/Oracle.Database/autonomousDatabases/eamonterraformtest501\",\"name\":\"eamonterraformtest501\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-17T19:55:06.3169995Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-17T20:48:27.1444348Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_eamonterraformtest501_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_eamonterraformtest501_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_eamonterraformtest501_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"eamonterraformtest501_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=opkzo7sj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_eamonterraformtest501_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"eamonterraformtest501_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=opkzo7sj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_eamonterraformtest501_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"eamonterraformtest501_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=opkzo7sj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_eamonterraformtest501_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"eamonterraformtest501_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=opkzo7sj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_eamonterraformtest501_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"eamonterraformtest501_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=opkzo7sj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_eamonterraformtest501_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"eamonterraformtest501_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=opkzo7sj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_eamonterraformtest501_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://opkzo7sj.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://opkzo7sj.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://opkzo7sj.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://opkzo7sj.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://opkzo7sj.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://opkzo7sj.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"eamonterraformtest501\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa6ad253hddyjdmflhjyjxs7ysao2l54lpe2qdgmq6bnja?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"opkzo7sj.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.29\",\"privateEndpointLabel\":\"opkzo7sj\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eamonterraformtest500/providers/Microsoft.Network/virtualNetworks/eamonterraformtest501_vnet/subnets/delegated\",\"timeCreated\":\"2024-04-17T20:04:27.412Z\",\"timeLocalDataGuardEnabled\":\"Wed Apr 17 20:04:46 UTC 2024\",\"timeMaintenanceBegin\":\"2024-04-21T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-04-21T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/eamonterraformtest500/providers/Microsoft.Network/virtualNetworks/eamonterraformtest501_vnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa6ad253hddyjdmflhjyjxs7ysao2l54lpe2qdgmq6bnja\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":1,\"usedDataStorageSizeInTbs\":1}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBFEATURE2\",\"name\":\"DBFEATURE2\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-18T03:51:10.1857915Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-24T23:47:25.9901577Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbfeature2_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbfeature2_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbfeature2_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbfeature2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=dcgyggls.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbfeature2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=dcgyggls.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbfeature2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=dcgyggls.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbfeature2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=dcgyggls.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbfeature2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=dcgyggls.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbfeature2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=dcgyggls.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://dcgyggls.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://dcgyggls.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://dcgyggls.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://dcgyggls.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://dcgyggls.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://dcgyggls.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DBFEATURE2\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"timeDataGuardRoleChanged\":\"2024-04-19T15:04:30.256Z\",\"timeDisasterRecoveryRoleChanged\":\"2024-04-19T15:04:30.256Z\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqajz7zig3blehcrg3bbbwkeiz6lniipmb2atoohewk33ya?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"dcgyggls.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.190\",\"privateEndpointLabel\":\"dcgyggls\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-04-18T03:55:05.033Z\",\"timeLocalDataGuardEnabled\":\"Thu Apr 18 03:55:21 UTC 2024\",\"timeMaintenanceBegin\":\"2024-04-28T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-04-28T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqajz7zig3blehcrg3bbbwkeiz6lniipmb2atoohewk33ya\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":1,\"usedDataStorageSizeInTbs\":1,\"timeOfLastSwitchover\":\"Fri Apr 19 15:04:30 UTC 2024\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dndcsqlphase2\",\"name\":\"dndcsqlphase2\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-19T11:53:50.2487428Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-19T11:53:50.2487428Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":256,\"dataStorageSizeInTbs\":null,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"dndcsqlphase2\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dndcsqlvnetphase2/subnets/dndcsqlphase2delegatedsubnet\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dndcsqlvnetphase2\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dndcsql\",\"name\":\"dndcsql\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-19T12:08:48.5644113Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-19T12:08:48.5644113Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"dndcsql\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dndcsqlvnetphase2/subnets/dndcsqlphase2delegatedsubnet\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dndcsqlvnetphase2\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dblinkaz2\",\"name\":\"dblinkaz2\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-19T12:13:35.4745859Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-15T18:17:43.6015854Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dblinkaz2_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dblinkaz2_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dblinkaz2_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dblinkaz2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dblinkaz2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dblinkaz2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dblinkaz2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dblinkaz2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dblinkaz2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dblinkaz2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dblinkaz2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dblinkaz2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dblinkaz2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jgwlzzfj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dblinkaz2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://jgwlzzfj.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://jgwlzzfj.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://jgwlzzfj.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://jgwlzzfj.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://jgwlzzfj.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://jgwlzzfj.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":100,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"dblinkaz2\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"timeDataGuardRoleChanged\":\"2024-04-19T13:18:24Z\",\"timeDisasterRecoveryRoleChanged\":\"2024-04-19T13:18:24Z\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa43s55le66zvhyimzsowxdkaykggnjl4prpd5oxoitpga?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"jgwlzzfj.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.242\",\"privateEndpointLabel\":\"jgwlzzfj\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-04-19T12:17:09.469Z\",\"timeLocalDataGuardEnabled\":\"Fri Apr 19 12:17:32 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-19T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-19T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa43s55le66zvhyimzsowxdkaykggnjl4prpd5oxoitpga\",\"backupRetentionPeriodInDays\":60,\"timeOfLastSwitchover\":\"Fri Apr 19 13:18:24 UTC 2024\",\"actualUsedDataStorageSizeInTbs\":0.0040767192840576172,\"allocatedStorageSizeInTbs\":0.0146484375}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/sample1atp\",\"name\":\"sample1atp\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-19T13:35:09.8523317Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-29T12:02:10.8617499Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_sample1atp_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_sample1atp_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_sample1atp_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"sample1atp_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"sample1atp_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"sample1atp_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"sample1atp_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"sample1atp_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"sample1atp_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"sample1atp_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"sample1atp_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"sample1atp_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"sample1atp_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rume8mkj.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample1atp_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://rume8mkj.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://rume8mkj.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://rume8mkj.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://rume8mkj.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://rume8mkj.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://rume8mkj.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"sample1atp\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"lagTimeInSeconds\":18},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqay4lvzcqseiqypjtoikgbk2vqi2bn47fuhcv2rdxref4q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"rume8mkj.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.140\",\"privateEndpointLabel\":\"rume8mkj\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-04-19T13:38:46.274Z\",\"timeLocalDataGuardEnabled\":\"Sun Apr 28 10:44:05 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-05T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-05T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqay4lvzcqseiqypjtoikgbk2vqi2bn47fuhcv2rdxref4q\",\"backupRetentionPeriodInDays\":60,\"localAdgAutoFailoverMaxDataLossLimit\":1}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Alec1/providers/Oracle.Database/autonomousDatabases/test0426josh\",\"name\":\"test0426josh\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-26T23:37:36.6033291Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-27T04:01:32.6788867Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_test0426josh_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_test0426josh_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_test0426josh_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"test0426josh_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"test0426josh_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"test0426josh_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"test0426josh_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"test0426josh_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"test0426josh_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"test0426josh_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"test0426josh_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"test0426josh_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"test0426josh_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=qkvrdu7w.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_test0426josh_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://qkvrdu7w.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://qkvrdu7w.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://qkvrdu7w.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://qkvrdu7w.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://qkvrdu7w.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://qkvrdu7w.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"test0426josh\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqasc3op26dhd46v3s3wadcgxa72vnsofiuweeojjhegqnq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"qkvrdu7w.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.226\",\"privateEndpointLabel\":\"qkvrdu7w\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Alec1/providers/Microsoft.Network/virtualNetworks/josh_0426_adbs_vnet/subnets/delegated\",\"timeCreated\":\"2024-04-26T23:41:30.139Z\",\"timeLocalDataGuardEnabled\":\"Fri Apr 26 23:42:01 UTC 2024\",\"timeMaintenanceBegin\":\"2024-04-28T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-04-28T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Alec1/providers/Microsoft.Network/virtualNetworks/josh_0426_adbs_vnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqasc3op26dhd46v3s3wadcgxa72vnsofiuweeojjhegqnq\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBFEATURE3\",\"name\":\"DBFEATURE3\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-29T08:15:06.8787974Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-04-29T08:15:06.8787974Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DBFEATURE3\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/PDBADWCheck\",\"name\":\"PDBADWCheck\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-30T09:16:53.6261715Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-04-30T12:47:48.701471Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdbadwcheck_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdbadwcheck_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdbadwcheck_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"pdbadwcheck_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=kcidjx1j.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbadwcheck_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"pdbadwcheck_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=kcidjx1j.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbadwcheck_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"pdbadwcheck_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=kcidjx1j.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbadwcheck_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"pdbadwcheck_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=kcidjx1j.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbadwcheck_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"pdbadwcheck_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=kcidjx1j.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbadwcheck_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"pdbadwcheck_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=kcidjx1j.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbadwcheck_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://kcidjx1j.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://kcidjx1j.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://kcidjx1j.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://kcidjx1j.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://kcidjx1j.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://kcidjx1j.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"PDBADWCheck\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqarivpp22sohm74viurndtkkgcgmijqzqifph4u37nafpq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"kcidjx1j.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.211\",\"privateEndpointLabel\":\"kcidjx1j\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-04-30T09:20:43.641Z\",\"timeMaintenanceBegin\":\"2024-05-05T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-05T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqarivpp22sohm74viurndtkkgcgmijqzqifph4u37nafpq\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBFeature5\",\"name\":\"DBFeature5\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-30T09:25:23.8459971Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-03T02:47:53.2155124Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbfeature5_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbfeature5_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbfeature5_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbfeature5_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=epuwafkd.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature5_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbfeature5_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=epuwafkd.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature5_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbfeature5_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=epuwafkd.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature5_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbfeature5_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=epuwafkd.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature5_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbfeature5_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=epuwafkd.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature5_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbfeature5_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=epuwafkd.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbfeature5_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://epuwafkd.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://epuwafkd.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://epuwafkd.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://epuwafkd.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://epuwafkd.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://epuwafkd.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DBFeature5\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaztvteadjoirhjhsfdseci76mndf43znriqwaddmhywma?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"epuwafkd.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.60\",\"privateEndpointLabel\":\"epuwafkd\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-04-30T09:29:23.882Z\",\"timeLocalDataGuardEnabled\":\"Tue Apr 30 09:30:06 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-05T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-05T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaztvteadjoirhjhsfdseci76mndf43znriqwaddmhywma\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsdemotest2/providers/Oracle.Database/autonomousDatabases/Adbsadbsdemotest2\",\"name\":\"Adbsadbsdemotest2\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{\"createdby\":\"eelhomsi\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-30T10:57:33.4511609Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-03T06:18:01.2061911Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsadbsdemotest2_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsadbsdemotest2_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsadbsdemotest2_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"adbsadbsdemotest2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbsadbsdemotest2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbsadbsdemotest2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"adbsadbsdemotest2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"adbsadbsdemotest2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"adbsadbsdemotest2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbsadbsdemotest2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbsadbsdemotest2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"adbsadbsdemotest2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"adbsadbsdemotest2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yqaqvu0v.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsadbsdemotest2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://yqaqvu0v.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://yqaqvu0v.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://yqaqvu0v.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://yqaqvu0v.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://yqaqvu0v.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://yqaqvu0v.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":32,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"example_autonomous_databasedb1\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Deleting\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqakl7iw27sj252r5uvmzyvoq27e3b6udp5eh57xyx5f2wa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"yqaqvu0v.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.192\",\"privateEndpointLabel\":\"yqaqvu0v\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsdemotest2/providers/Microsoft.Network/virtualNetworks/adbsdemotest2_vnet/subnets/adbsdemotest2_subnet\",\"timeCreated\":\"2024-04-30T11:07:17.478Z\",\"timeLocalDataGuardEnabled\":\"Tue Apr 30 11:07:34 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-05T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-05T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsdemotest2/providers/Microsoft.Network/virtualNetworks/adbsdemotest2_vnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqakl7iw27sj252r5uvmzyvoq27e3b6udp5eh57xyx5f2wa\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DND2May\",\"name\":\"DND2May\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-02T06:14:04.1816533Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:31.3645519Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dnd2may_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dnd2may_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dnd2may_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dnd2may_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dnd2may_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dnd2may_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dnd2may_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dnd2may_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dnd2may_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dnd2may_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dnd2may_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dnd2may_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dnd2may_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jfz7y85f.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dnd2may_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":20,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"DND2May\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaapkbmaq4y6srx4u2ciehb3f7yn3zpq4vb4afzs6zntna?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"jfz7y85f.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.119\",\"privateEndpointLabel\":\"jfz7y85f\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-05-02T06:17:43.375Z\",\"timeLocalDataGuardEnabled\":\"Thu May 02 06:18:10 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaapkbmaq4y6srx4u2ciehb3f7yn3zpq4vb4afzs6zntna\",\"backupRetentionPeriodInDays\":60,\"databaseEdition\":\"StandardEdition\",\"actualUsedDataStorageSizeInTbs\":0.0069078803062438965,\"allocatedStorageSizeInTbs\":0.0107421875}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo0503/providers/Oracle.Database/autonomousDatabases/adbsDemo0503\",\"name\":\"adbsDemo0503\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-03T02:32:54.4880967Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-03T02:32:54.4880967Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"adbsDemo0503\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo0503/providers/Microsoft.Network/virtualNetworks/demo0503/subnets/delegated\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo0503/providers/Microsoft.Network/virtualNetworks/demo0503\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo0503/providers/Oracle.Database/autonomousDatabases/AdbsDemo0503Test\",\"name\":\"AdbsDemo0503Test\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-03T02:49:05.4002849Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-15T18:17:49.5728983Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":12.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsdemo0503test_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsdemo0503test_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbsdemo0503test_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"adbsdemo0503test_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=mbjzzghi.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsdemo0503test_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbsdemo0503test_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=mbjzzghi.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsdemo0503test_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbsdemo0503test_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=mbjzzghi.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsdemo0503test_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"adbsdemo0503test_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=mbjzzghi.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsdemo0503test_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbsdemo0503test_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=mbjzzghi.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsdemo0503test_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbsdemo0503test_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=mbjzzghi.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbsdemo0503test_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://mbjzzghi.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://mbjzzghi.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://mbjzzghi.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://mbjzzghi.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://mbjzzghi.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://mbjzzghi.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"AdbsDemo0503Test\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqax7kuujxnhbzseb4nnnlqmtii2hlxfsgqdfxtpnmol6ya?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"mbjzzghi.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.119\",\"privateEndpointLabel\":\"mbjzzghi\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsdemotest2/providers/Microsoft.Network/virtualNetworks/adbsdemotest2_vnet/subnets/adbsdemotest2_subnet\",\"timeCreated\":\"2024-05-03T02:52:47.595Z\",\"timeLocalDataGuardEnabled\":\"Fri May 03 02:53:09 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-19T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-19T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsdemotest2/providers/Microsoft.Network/virtualNetworks/adbsdemotest2_vnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqax7kuujxnhbzseb4nnnlqmtii2hlxfsgqdfxtpnmol6ya\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":0.0046073198318481445,\"allocatedStorageSizeInTbs\":0.015625}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/AdbTestPrivate03\",\"name\":\"AdbTestPrivate03\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-03T03:14:44.0017111Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-03T07:17:49.2909125Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbtestprivate03_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbtestprivate03_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbtestprivate03_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"adbtestprivate03_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbtestprivate03_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbtestprivate03_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"adbtestprivate03_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"adbtestprivate03_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"adbtestprivate03_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbtestprivate03_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbtestprivate03_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"adbtestprivate03_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"adbtestprivate03_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=w0f3t5i8.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbtestprivate03_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://w0f3t5i8.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://w0f3t5i8.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://w0f3t5i8.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://w0f3t5i8.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://w0f3t5i8.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://w0f3t5i8.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"AdbTestPrivate03\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqav7yhulfu7w5nylnq3m757llrptbud7vh2cjpr537rzqa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"w0f3t5i8.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.29\",\"privateEndpointLabel\":\"w0f3t5i8\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-05-03T03:18:11.461Z\",\"timeLocalDataGuardEnabled\":\"Fri May 03 03:18:34 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-05T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-05T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqav7yhulfu7w5nylnq3m757llrptbud7vh2cjpr537rzqa\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/orpsandbox/providers/Oracle.Database/autonomousDatabases/walletpdb\",\"name\":\"walletpdb\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-03T08:29:00.4787579Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-03T08:29:00.4787579Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"walletpdb\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IndigoAdbsTest/providers/Microsoft.Network/virtualNetworks/IndigoAdbsTestVnet2/subnets/delegated\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/IndigoAdbsTest/providers/Microsoft.Network/virtualNetworks/IndigoAdbsTestVnet2\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/wallettest\",\"name\":\"wallettest\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-03T08:32:12.3016053Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-15T18:32:41.3773817Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_wallettest_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_wallettest_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_wallettest_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"wallettest_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ah14qijm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_wallettest_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"wallettest_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ah14qijm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_wallettest_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"wallettest_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ah14qijm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_wallettest_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"wallettest_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ah14qijm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_wallettest_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"wallettest_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ah14qijm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_wallettest_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"wallettest_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ah14qijm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_wallettest_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://ah14qijm.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://ah14qijm.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://ah14qijm.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://ah14qijm.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://ah14qijm.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://ah14qijm.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"wallettest\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaldqyabgcxpgb47lvqjm4edxgw25nyv4bfe65z6eclvda?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"ah14qijm.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.243\",\"privateEndpointLabel\":\"ah14qijm\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"timeCreated\":\"2024-05-03T08:36:07.959Z\",\"timeLocalDataGuardEnabled\":\"Fri May 03 08:44:38 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-19T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-19T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaldqyabgcxpgb47lvqjm4edxgw25nyv4bfe65z6eclvda\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":0.0037770867347717285,\"allocatedStorageSizeInTbs\":0.0244140625}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ehua-test/providers/Oracle.Database/autonomousDatabases/OFakeWalletDemoDONOTDELETE\",\"name\":\"OFakeWalletDemoDONOTDELETE\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-03T17:09:42.4428538Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-03T17:09:42.4428538Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"OFakeWalletDemoDONOTDELETE\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ehua-test/providers/Microsoft.Network/virtualNetworks/ehua-vnet/subnets/ehua-subnet\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ehua-test/providers/Microsoft.Network/virtualNetworks/ehua-vnet\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/testch01\",\"name\":\"testch01\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-06T04:03:06.0267148Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-06T04:03:06.0267148Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"testch01\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/sample1\",\"name\":\"sample1\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-07T17:11:46.8077069Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-07T17:11:46.8077069Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":[\"172.174.234.209\"],\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"sample1\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":null,\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":null,\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/ATPPAID0805\",\"name\":\"ATPPAID0805\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-08T06:19:29.171502Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:26.3057308Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_atppaid0805_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_atppaid0805_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_atppaid0805_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"atppaid0805_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_atppaid0805_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"atppaid0805_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_atppaid0805_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"atppaid0805_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_atppaid0805_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"atppaid0805_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_atppaid0805_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"atppaid0805_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_atppaid0805_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://G65795D1A5CE1E9-ATPPAID0805.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://G65795D1A5CE1E9-ATPPAID0805.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://G65795D1A5CE1E9-ATPPAID0805.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://G65795D1A5CE1E9-ATPPAID0805.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://G65795D1A5CE1E9-ATPPAID0805.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://G65795D1A5CE1E9-ATPPAID0805.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":20,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"ATPPAID0805\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":true,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqa674iqzvax5s52o2sdzex5psii72vwwmvba4l67g3vmua?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"lifecycleState\":\"Available\",\"timeCreated\":\"2024-05-08T06:19:48.225Z\",\"timeLocalDataGuardEnabled\":\"Wed May 08 06:20:10 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T22:00:00Z\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqa674iqzvax5s52o2sdzex5psii72vwwmvba4l67g3vmua\",\"backupRetentionPeriodInDays\":60,\"actualUsedDataStorageSizeInTbs\":0.0039044618606567383,\"allocatedStorageSizeInTbs\":0.0087890625}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG-jvartak/providers/Oracle.Database/autonomousDatabases/AdbsAllowedIps02\",\"name\":\"AdbsAllowedIps02\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-10T14:00:15.0048138Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-10T14:00:15.0048138Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":[\"4.236.178.44\"],\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":null,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"AdbsAllowedIps02\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":null,\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":null,\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG-jvartak/providers/Oracle.Database/autonomousDatabases/AdbsPrivate01\",\"name\":\"AdbsPrivate01\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-10T14:23:06.4049301Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-10T14:23:06.4049301Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":null,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"AdbsPrivate01\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG-jvartak/providers/Microsoft.Network/virtualNetworks/jvartaktestvnet/subnets/jvtest\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG-jvartak/providers/Microsoft.Network/virtualNetworks/jvartaktestvnet\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo0503/providers/Oracle.Database/autonomousDatabases/Mtlstest\",\"name\":\"Mtlstest\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-13T20:12:39.3714748Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-13T20:12:39.3714748Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":null,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"Mtlstest\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":true,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":null,\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":null,\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo0503/providers/Oracle.Database/autonomousDatabases/MtlsTest01\",\"name\":\"MtlsTest01\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-13T21:13:47.2700591Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-13T21:13:47.2700591Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"MtlsTest01\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":true,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":null,\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":null,\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/wallettest1\",\"name\":\"wallettest1\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-14T04:41:24.8261033Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-14T04:41:24.8261033Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"wallettest1\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":true,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":null,\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":null,\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/demo0503/providers/Oracle.Database/autonomousDatabases/MtlsTest03\",\"name\":\"MtlsTest03\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-14T14:31:33.1790664Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-14T14:31:33.1790664Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"MtlsTest03\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":true,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsdemotest2/providers/Microsoft.Network/virtualNetworks/adbsdemotest2_vnet/subnets/default\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsdemotest2/providers/Microsoft.Network/virtualNetworks/adbsdemotest2_vnet\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/ds123\",\"name\":\"ds123\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-15T04:28:21.3803038Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:35.501296Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.00480419397354126,\"allocatedStorageSizeInTbs\":0.044921875,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ds123_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ds123_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ds123_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ds123_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ds123_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ds123_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ds123_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ds123_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ds123_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ds123_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ds123_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ds123_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ds123_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://G65795D1A5CE1E9-DS123.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://G65795D1A5CE1E9-DS123.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://G65795D1A5CE1E9-DS123.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://G65795D1A5CE1E9-DS123.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://G65795D1A5CE1E9-DS123.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://G65795D1A5CE1E9-DS123.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"ds123\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":true,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqajg4ljttuaivdxyrcxsmcbhdtscrgm7swc5qcgg746u4a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"lifecycleState\":\"Available\",\"timeCreated\":\"2024-05-15T04:28:37.917Z\",\"timeLocalDataGuardEnabled\":\"Wed May 15 04:28:55 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T22:00:00Z\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqajg4ljttuaivdxyrcxsmcbhdtscrgm7swc5qcgg746u4a\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/sample3atp\",\"name\":\"sample3atp\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-15T04:36:15.041323Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:37.0364496Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0,\"allocatedStorageSizeInTbs\":0.0087890625,\"whitelistedIps\":[\"20.121.44.224\",\"172.174.234.0/24\",\"172.203.217.10\",\"106.221.202.187\"],\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_sample3atp_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_sample3atp_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_sample3atp_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"sample3atp_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"sample3atp_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"sample3atp_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"sample3atp_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"sample3atp_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"sample3atp_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"sample3atp_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"sample3atp_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"sample3atp_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"sample3atp_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_sample3atp_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://G65795D1A5CE1E9-SAMPLE3ATP.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://G65795D1A5CE1E9-SAMPLE3ATP.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://G65795D1A5CE1E9-SAMPLE3ATP.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://G65795D1A5CE1E9-SAMPLE3ATP.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://G65795D1A5CE1E9-SAMPLE3ATP.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://G65795D1A5CE1E9-SAMPLE3ATP.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":20,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"sample3atp\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":true,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"Adg\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"lagTimeInSeconds\":0},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa6wttb7yapif7o35dzjtjxk4supdvhrpnh6ba7m3j7iza?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadOnly\",\"lifecycleState\":\"Stopped\",\"timeCreated\":\"2024-05-15T04:36:23.868Z\",\"timeLocalDataGuardEnabled\":\"Mon May 20 16:15:23 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T14:00:00Z\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa6wttb7yapif7o35dzjtjxk4supdvhrpnh6ba7m3j7iza\",\"backupRetentionPeriodInDays\":20,\"localAdgAutoFailoverMaxDataLossLimit\":3500}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dbmscloud1partip\",\"name\":\"dbmscloud1partip\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-15T06:26:03.6535671Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:33.9768927Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0062903165817260742,\"allocatedStorageSizeInTbs\":0.0361328125,\"whitelistedIps\":[\"172.174.234.209\"],\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbmscloud1partip_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbmscloud1partip_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbmscloud1partip_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbmscloud1partip_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloud1partip_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbmscloud1partip_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloud1partip_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbmscloud1partip_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloud1partip_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbmscloud1partip_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloud1partip_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbmscloud1partip_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloud1partip_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbmscloud1partip_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloud1partip_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://G65795D1A5CE1E9-DBMSCLOUD1PARTIP.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://G65795D1A5CE1E9-DBMSCLOUD1PARTIP.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://G65795D1A5CE1E9-DBMSCLOUD1PARTIP.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://G65795D1A5CE1E9-DBMSCLOUD1PARTIP.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://G65795D1A5CE1E9-DBMSCLOUD1PARTIP.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://G65795D1A5CE1E9-DBMSCLOUD1PARTIP.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"dbmscloud1partip\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqabpwiv2fh4yj2dlwkylmzucne2rbzxpo5hrvxki6exqwa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"lifecycleState\":\"Available\",\"timeCreated\":\"2024-05-15T06:26:12.321Z\",\"timeLocalDataGuardEnabled\":\"Wed May 15 06:26:48 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqabpwiv2fh4yj2dlwkylmzucne2rbzxpo5hrvxki6exqwa\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dbmscloudpe1\",\"name\":\"dbmscloudpe1\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-15T12:25:42.0927138Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-15T12:25:42.0927138Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"dbmscloudpe1\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dbmscloudpe2\",\"name\":\"dbmscloudpe2\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{\"qe\":\"eqr\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-16T06:14:59.5138097Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:34.8058515Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0046866536140441895,\"allocatedStorageSizeInTbs\":0.044921875,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbmscloudpe2_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbmscloudpe2_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbmscloudpe2_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbmscloudpe2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbmscloudpe2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbmscloudpe2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dbmscloudpe2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dbmscloudpe2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbmscloudpe2_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbmscloudpe2_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbmscloudpe2_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"dbmscloudpe2_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"dbmscloudpe2_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=ypieowfk.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbmscloudpe2_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://ypieowfk.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://ypieowfk.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://ypieowfk.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://ypieowfk.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://ypieowfk.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://ypieowfk.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"dbmscloudpe2\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"ypieowfk.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.173\",\"privateEndpointLabel\":\"ypieowfk\",\"lifecycleState\":\"Available\",\"timeCreated\":\"2024-05-16T06:18:57.516Z\",\"timeLocalDataGuardEnabled\":\"Thu May 16 06:19:31 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T22:00:00Z\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqa4ytn33tyeiza2ku7uw3rz3mwt4hizeoaw6f5ricnetda\",\"backupRetentionPeriodInDays\":60,\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqa4ytn33tyeiza2ku7uw3rz3mwt4hizeoaw6f5ricnetda?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tstpreprod16/providers/Oracle.Database/autonomousDatabases/orpadbs17preprod\",\"name\":\"orpadbs17preprod\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-16T20:21:21.4607067Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":1,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"orpadbs17preprod\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tstpreprod16/providers/Microsoft.Network/virtualNetworks/orp_adbs17_vnet/subnets/orp_adbs17_subnet\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tstpreprod16/providers/Microsoft.Network/virtualNetworks/orp_adbs17_vnet\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dblinkpe\",\"name\":\"dblinkpe\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-17T08:40:59.517148Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-05-17T08:40:59.517148Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":null,\"allocatedStorageSizeInTbs\":null,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"connectionStrings\":null,\"connectionUrls\":null,\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":50,\"dataStorageSizeInTbs\":null,\"databaseEdition\":null,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"dblinkpe\",\"inMemoryAreaInGbs\":null,\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":null,\"isRemoteDataGuardEnabled\":null,\"localDisasterRecoveryType\":null,\"localStandbyDb\":null,\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":null,\"provisioningState\":\"Failed\",\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":null,\"operationsInsightsStatus\":null,\"permissionLevel\":\"Restricted\",\"privateEndpoint\":null,\"privateEndpointIp\":null,\"privateEndpointLabel\":null,\"provisionableCpus\":null,\"lifecycleState\":null,\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/customercontactvnet/subnets/custcontactsubnet\",\"supportedRegionsToCloneTo\":null,\"timeCreated\":null,\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":null,\"timeMaintenanceBegin\":null,\"timeMaintenanceEnd\":null,\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/customercontactvnet\",\"ocid\":null,\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OL8supportTestGroup/providers/Oracle.Database/autonomousDatabases/OFakeAdbs\",\"name\":\"OFakeAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-23T15:01:47.7145814Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-23T18:18:33.4390023Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0024133920669555664,\"allocatedStorageSizeInTbs\":0.0068359375,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakeadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakeadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakeadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakeadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yrlatycs.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakeadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakeadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yrlatycs.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakeadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakeadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=yrlatycs.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakeadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakeadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yrlatycs.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakeadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakeadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yrlatycs.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakeadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakeadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=yrlatycs.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakeadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://yrlatycs.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://yrlatycs.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://yrlatycs.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://yrlatycs.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://yrlatycs.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://yrlatycs.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"OFakeAdbs\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqakeg5ocn2asis5wroryykozy7qw2gcezd6zyhkhs36xwa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"yrlatycs.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.55\",\"privateEndpointLabel\":\"yrlatycs\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OL8supportTestGroup/providers/Microsoft.Network/virtualNetworks/sysvereastus/subnets/delegated\",\"timeCreated\":\"2024-05-23T15:10:28.018Z\",\"timeMaintenanceBegin\":\"2024-05-26T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-26T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/OL8supportTestGroup/providers/Microsoft.Network/virtualNetworks/sysvereastus\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqakeg5ocn2asis5wroryykozy7qw2gcezd6zyhkhs36xwa\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/suryatest\",\"name\":\"suryatest\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-23T16:59:44.9126091Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-23T22:48:55.221135Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.00305330753326416,\"allocatedStorageSizeInTbs\":0.0146484375,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_suryatest_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_suryatest_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_suryatest_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"suryatest_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jmy6zhkx.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_suryatest_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"suryatest_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jmy6zhkx.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_suryatest_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"suryatest_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=jmy6zhkx.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_suryatest_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"suryatest_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jmy6zhkx.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_suryatest_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"suryatest_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jmy6zhkx.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_suryatest_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"suryatest_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=jmy6zhkx.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_suryatest_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://jmy6zhkx.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://jmy6zhkx.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://jmy6zhkx.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://jmy6zhkx.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://jmy6zhkx.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://jmy6zhkx.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"suryatest\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa44ng4eo6qv5uqsycpzf5gzsma34z6ltbfzhetfwoab6a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"jmy6zhkx.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.2.38\",\"privateEndpointLabel\":\"jmy6zhkx\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dbqa-vcn/subnets/dbqa-client-subnet\",\"timeCreated\":\"2024-05-23T17:03:53.962Z\",\"timeLocalDataGuardEnabled\":\"Thu May 23 17:04:18 UTC 2024\",\"timeMaintenanceBegin\":\"2024-05-26T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-05-26T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dbqa-vcn\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa44ng4eo6qv5uqsycpzf5gzsma34z6ltbfzhetfwoab6a\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/syd_e2e_test/providers/Oracle.Database/autonomousDatabases/adbssyde2e\",\"name\":\"adbssyde2e\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-30T20:46:33.5176278Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:39.0018831Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.00617671012878418,\"allocatedStorageSizeInTbs\":0.0380859375,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":3.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbssyde2e_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbssyde2e_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_adbssyde2e_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"adbssyde2e_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rctjwxmm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbssyde2e_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbssyde2e_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rctjwxmm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbssyde2e_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbssyde2e_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=rctjwxmm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbssyde2e_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"adbssyde2e_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rctjwxmm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbssyde2e_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"adbssyde2e_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rctjwxmm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbssyde2e_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"adbssyde2e_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=rctjwxmm.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_adbssyde2e_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"adbssyde2e\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":true,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"Adg\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"lagTimeInSeconds\":40},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa2huajoq3oorsgcnzfr4wsmr75fdjodqaofkewpry7y4a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"rctjwxmm.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.47.207\",\"privateEndpointLabel\":\"rctjwxmm\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/syd_e2e_test/providers/Microsoft.Network/virtualNetworks/syd_e2e_test_vnet/subnets/syd_e2e_test_subnet\",\"timeCreated\":\"2024-05-30T20:54:54.997Z\",\"timeLocalDataGuardEnabled\":\"Mon Jul 01 20:06:48 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/syd_e2e_test/providers/Microsoft.Network/virtualNetworks/syd_e2e_test_vnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa2huajoq3oorsgcnzfr4wsmr75fdjodqaofkewpry7y4a\",\"backupRetentionPeriodInDays\":60,\"localAdgAutoFailoverMaxDataLossLimit\":0}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testgroup/providers/Oracle.Database/autonomousDatabases/udotest001\",\"name\":\"udotest001\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-05T19:54:07.9489617Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-05T23:32:41.2870259Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0,\"allocatedStorageSizeInTbs\":0.0,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_udotest001_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_udotest001_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_udotest001_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"udotest001_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=gc1od6gq.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_udotest001_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"udotest001_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=gc1od6gq.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_udotest001_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"udotest001_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=gc1od6gq.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_udotest001_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://gc1od6gq.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://gc1od6gq.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://gc1od6gq.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://gc1od6gq.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://gc1od6gq.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://gc1od6gq.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"udotest001\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":true,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa6of3gvtazirphmkcleiio6yfdwq4y5msiav2frv4l2eq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"gc1od6gq.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.6.116\",\"privateEndpointLabel\":\"gc1od6gq\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/0409Test/providers/Microsoft.Network/virtualNetworks/0409VN/subnets/dg1\",\"timeCreated\":\"2024-06-05T20:03:23.305Z\",\"timeMaintenanceBegin\":\"2024-06-09T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-06-09T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/0409Test/providers/Microsoft.Network/virtualNetworks/0409VN\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa6of3gvtazirphmkcleiio6yfdwq4y5msiav2frv4l2eq\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/orpsandbox/providers/Oracle.Database/autonomousDatabases/udotest003\",\"name\":\"udotest003\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-05T20:40:00.4200751Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-06T00:17:43.9853204Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0023592114448547363,\"allocatedStorageSizeInTbs\":0.0068359375,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_udotest003_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_udotest003_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_udotest003_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"udotest003_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wwh71sze.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_udotest003_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"udotest003_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wwh71sze.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_udotest003_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"udotest003_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wwh71sze.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_udotest003_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://wwh71sze.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://wwh71sze.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://wwh71sze.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://wwh71sze.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://wwh71sze.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://wwh71sze.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"udotest003\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":true,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqaqzcl5voflv7evclh42wk4pynz54beqq4gl5hsgwymowq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"wwh71sze.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.6.192\",\"privateEndpointLabel\":\"wwh71sze\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/0409Test/providers/Microsoft.Network/virtualNetworks/0409VN/subnets/dg1\",\"timeCreated\":\"2024-06-05T20:43:36.694Z\",\"timeMaintenanceBegin\":\"2024-06-09T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-06-09T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/0409Test/providers/Microsoft.Network/virtualNetworks/0409VN\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqaqzcl5voflv7evclh42wk4pynz54beqq4gl5hsgwymowq\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/dbtest11\",\"name\":\"dbtest11\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-06T11:48:59.130396Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-06T15:33:39.593544Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0,\"allocatedStorageSizeInTbs\":0.0,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbtest11_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbtest11_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbtest11_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbtest11_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=i1vbb2et.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbtest11_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbtest11_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=i1vbb2et.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbtest11_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbtest11_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=i1vbb2et.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbtest11_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbtest11_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=i1vbb2et.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbtest11_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbtest11_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=i1vbb2et.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbtest11_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbtest11_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=i1vbb2et.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbtest11_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://i1vbb2et.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://i1vbb2et.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://i1vbb2et.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://i1vbb2et.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://i1vbb2et.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://i1vbb2et.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"dbtest11\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaaiaca5j2zem3yanh3qotdtnghgj3retphqvwormq625a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"i1vbb2et.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.6.75\",\"privateEndpointLabel\":\"i1vbb2et\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/0409Test/providers/Microsoft.Network/virtualNetworks/0409VN/subnets/dg1\",\"timeCreated\":\"2024-06-06T11:52:56.553Z\",\"timeLocalDataGuardEnabled\":\"Thu Jun 06 11:53:32 UTC 2024\",\"timeMaintenanceBegin\":\"2024-06-09T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-06-09T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/0409Test/providers/Microsoft.Network/virtualNetworks/0409VN\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaaiaca5j2zem3yanh3qotdtnghgj3retphqvwormq625a\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/orpsandbox3test\",\"name\":\"orpsandbox3test\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{\"testtag\":\"test\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-06T14:20:49.403434Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:36.2238997Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0061936378479003906,\"allocatedStorageSizeInTbs\":0.0361328125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_orpsandbox3test_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_orpsandbox3test_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_orpsandbox3test_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"orpsandbox3test_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=hhbrpiy9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_orpsandbox3test_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"orpsandbox3test_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=hhbrpiy9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_orpsandbox3test_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"orpsandbox3test_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=hhbrpiy9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_orpsandbox3test_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"orpsandbox3test_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=hhbrpiy9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_orpsandbox3test_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"orpsandbox3test_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=hhbrpiy9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_orpsandbox3test_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"orpsandbox3test_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=hhbrpiy9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_orpsandbox3test_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"orpsandbox3test\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"hhbrpiy9.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.52.0.238\",\"privateEndpointLabel\":\"hhbrpiy9\",\"lifecycleState\":\"Available\",\"timeCreated\":\"2024-06-06T14:24:28.674Z\",\"timeLocalDataGuardEnabled\":\"Thu Jun 06 14:25:09 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqaidmui323bz2ur2fs2pth7eok65woqrozrksgfrnjexwa\",\"backupRetentionPeriodInDays\":60,\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqaidmui323bz2ur2fs2pth7eok65woqrozrksgfrnjexwa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Oracle.Database/autonomousDatabases/SmmAdbs9834\",\"name\":\"SmmAdbs9834\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-12T05:45:03.051147Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-12T09:48:06.0113532Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0,\"allocatedStorageSizeInTbs\":0.0,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_smmadbs9834_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_smmadbs9834_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_smmadbs9834_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"smmadbs9834_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"smmadbs9834_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"smmadbs9834_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"smmadbs9834_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"smmadbs9834_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"smmadbs9834_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"smmadbs9834_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"smmadbs9834_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"smmadbs9834_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"smmadbs9834_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=plycblmy.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_smmadbs9834_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://plycblmy.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://plycblmy.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://plycblmy.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://plycblmy.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://plycblmy.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://plycblmy.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"SmmAdbs9834\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqaprxvcjnmg54h5uzhmxeszwak2ufoaitvy5c4yvgzrsua?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"plycblmy.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.220\",\"privateEndpointLabel\":\"plycblmy\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/SmmAshVnet1/subnets/delegated1\",\"timeCreated\":\"2024-06-12T05:49:01.112Z\",\"timeLocalDataGuardEnabled\":\"Wed Jun 12 05:51:08 UTC 2024\",\"timeMaintenanceBegin\":\"2024-06-16T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-06-16T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/SmmAshVnet1\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqaprxvcjnmg54h5uzhmxeszwak2ufoaitvy5c4yvgzrsua\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/Backup17jun\",\"name\":\"Backup17jun\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-17T05:50:25.5513875Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-18T05:57:12.2805094Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"dataStorageSizeInGbs\":20,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"Backup17jun\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"permissionLevel\":\"Restricted\",\"lifecycleState\":\"Unavailable\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01/subnets/default\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/drTest/providers/Microsoft.Network/virtualNetworks/drTestVnet01\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/PDBJun19\",\"name\":\"PDBJun19\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"shubham@orpsandbox3.onmicrosoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-19T14:37:40.6537292Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:32.1784222Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0,\"allocatedStorageSizeInTbs\":0.0087890625,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdbjun19_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdbjun19_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_pdbjun19_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"pdbjun19_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"pdbjun19_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"pdbjun19_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"pdbjun19_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"pdbjun19_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"pdbjun19_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"pdbjun19_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"pdbjun19_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"pdbjun19_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"pdbjun19_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wk2pxbuc.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_pdbjun19_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":20,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"PDBJun19\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"timeDataGuardRoleChanged\":\"2024-06-21T12:35:52.722Z\",\"timeDisasterRecoveryRoleChanged\":\"2024-06-21T12:35:52.722Z\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqayov52sjlzjsaiemk5v7f4cctkuccekzixja2cytocboa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"wk2pxbuc.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.28\",\"privateEndpointLabel\":\"wk2pxbuc\",\"lifecycleState\":\"Stopped\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19/subnets/default2\",\"timeCreated\":\"2024-06-19T14:46:58.706Z\",\"timeLocalDataGuardEnabled\":\"Wed Jun 19 14:47:19 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqayov52sjlzjsaiemk5v7f4cctkuccekzixja2cytocboa\",\"backupRetentionPeriodInDays\":60,\"timeOfLastSwitchover\":\"Fri Jun 21 12:35:52 UTC 2024\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error.\\nRefer to JobId fb59e94c-7a74-447a-a716-7cf4533a6640 and WorkRequestId b0e89f15-6b67-45f6-add7-cbb8e9144c92 when opening a Service Request at My Oracle Support.\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/commonAccPDB\",\"name\":\"commonAccPDB\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"adbs-dbqa@orpsandbox3.onmicrosoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-27T03:56:11.6636592Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:33.1025278Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0038846135139465332,\"allocatedStorageSizeInTbs\":0.0078125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_commonaccpdb_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_commonaccpdb_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_commonaccpdb_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"commonaccpdb_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"commonaccpdb_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"commonaccpdb_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"commonaccpdb_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"commonaccpdb_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"commonaccpdb_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"commonaccpdb_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"commonaccpdb_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"commonaccpdb_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"commonaccpdb_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=vifnfx8g.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_commonaccpdb_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":20,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"commonAccPDB\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":true,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"Adg\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\",\"lagTimeInSeconds\":42},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqahxk2poom7u3fatypdqiqqkwvbqqchyhsylogem3admha?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"vifnfx8g.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.186\",\"privateEndpointLabel\":\"vifnfx8g\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19/subnets/default2\",\"timeCreated\":\"2024-06-27T03:59:48.414Z\",\"timeLocalDataGuardEnabled\":\"Thu Jun 27 15:54:22 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T12:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T14:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqahxk2poom7u3fatypdqiqqkwvbqqchyhsylogem3admha\",\"backupRetentionPeriodInDays\":60,\"localAdgAutoFailoverMaxDataLossLimit\":0}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Oracle.Database/autonomousDatabases/AdbsTest27June\",\"name\":\"AdbsTest27June\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-27T20:26:59.2585409Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-27T20:36:17.7494403Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"AdbsTest27June\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"permissionLevel\":\"Restricted\",\"lifecycleState\":\"Unavailable\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/TestVnJune27/subnets/Delegated\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/TestVnJune27\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Oracle.Database/autonomousDatabases/adbsprac\",\"name\":\"adbsprac\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-27T20:45:12.9332012Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-27T20:46:58.1795349Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"adbsprac\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"permissionLevel\":\"Restricted\",\"lifecycleState\":\"Unavailable\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/TestVnJune27/subnets/Delegated\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/TestVnJune27\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/givan-cpg-eus/providers/Oracle.Database/autonomousDatabases/givan627\",\"name\":\"givan627\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-06-27T21:28:32.8847835Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-06-28T22:31:40.3228411Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"dataStorageSizeInGbs\":20,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"givan627\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isMtlsConnectionRequired\":true,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"permissionLevel\":\"Restricted\",\"lifecycleState\":\"Unavailable\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Microsoft.Network/virtualNetworks/givan-vpn-eus/subnets/delegate\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/adbsTestVm1_group/providers/Microsoft.Network/virtualNetworks/givan-vpn-eus\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBA6NEWAO0207\",\"name\":\"DBA6NEWAO0207\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"adbs-dbqa@orpsandbox3.onmicrosoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-01T20:37:38.6915405Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:27.311661Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0037661194801330566,\"allocatedStorageSizeInTbs\":0.017578125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dba6newao0207_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dba6newao0207_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dba6newao0207_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dba6newao0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=y7sttfq6.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dba6newao0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dba6newao0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=y7sttfq6.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dba6newao0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dba6newao0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=y7sttfq6.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dba6newao0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dba6newao0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=y7sttfq6.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dba6newao0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dba6newao0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=y7sttfq6.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dba6newao0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dba6newao0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=y7sttfq6.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dba6newao0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DBA6NEWAO0207\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqa2a5fd6svkzppksintnm4qjtxrxajnxdf7n4qjv72rlva?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"y7sttfq6.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.71\",\"privateEndpointLabel\":\"y7sttfq6\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19/subnets/default2\",\"timeCreated\":\"2024-07-01T20:41:22.213Z\",\"timeLocalDataGuardEnabled\":\"Mon Jul 01 20:41:53 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqa2a5fd6svkzppksintnm4qjtxrxajnxdf7n4qjv72rlva\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBARTUYDW0207\",\"name\":\"DBARTUYDW0207\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"adbs-dbqa@orpsandbox3.onmicrosoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-01T21:23:07.883185Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:30.5533431Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0037573575973510742,\"allocatedStorageSizeInTbs\":0.025390625,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbartuydw0207_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbartuydw0207_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbartuydw0207_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbartuydw0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=pfwukijt.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbartuydw0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbartuydw0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=pfwukijt.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbartuydw0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbartuydw0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=pfwukijt.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbartuydw0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbartuydw0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=pfwukijt.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbartuydw0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbartuydw0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=pfwukijt.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbartuydw0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbartuydw0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=pfwukijt.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbartuydw0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://pfwukijt.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://pfwukijt.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://pfwukijt.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://pfwukijt.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://pfwukijt.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://pfwukijt.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DBARTUYDW0207\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqazxj7yqnay4xijavj7w4dvkylxwxkehf3ueo7yqxyxncq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"pfwukijt.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.254\",\"privateEndpointLabel\":\"pfwukijt\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19/subnets/default2\",\"timeCreated\":\"2024-07-01T21:26:48.217Z\",\"timeLocalDataGuardEnabled\":\"Mon Jul 01 21:27:05 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T20:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T22:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljrnirvylqazxj7yqnay4xijavj7w4dvkylxwxkehf3ueo7yqxyxncq\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBAMXJLRB0207\",\"name\":\"DBAMXJLRB0207\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"adbs-dbqa@orpsandbox3.onmicrosoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-02T01:51:33.2492138Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:29.6650568Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0037557482719421387,\"allocatedStorageSizeInTbs\":0.017578125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbamxjlrb0207_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbamxjlrb0207_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbamxjlrb0207_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbamxjlrb0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wvrdwnp0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbamxjlrb0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbamxjlrb0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wvrdwnp0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbamxjlrb0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbamxjlrb0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=wvrdwnp0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbamxjlrb0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbamxjlrb0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wvrdwnp0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbamxjlrb0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbamxjlrb0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wvrdwnp0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbamxjlrb0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbamxjlrb0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=wvrdwnp0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbamxjlrb0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DBAMXJLRB0207\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa5vqsu6xhqpakh6ahxzqjzlvobve4ntlh2glplb5qk3ra?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"wvrdwnp0.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.21\",\"privateEndpointLabel\":\"wvrdwnp0\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19/subnets/default2\",\"timeCreated\":\"2024-07-02T01:55:26.179Z\",\"timeLocalDataGuardEnabled\":\"Tue Jul 02 01:55:44 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljsnirvylqa5vqsu6xhqpakh6ahxzqjzlvobve4ntlh2glplb5qk3ra\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/autonomousDatabases/DBADB76AI0207\",\"name\":\"DBADB76AI0207\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"adbs-dbqa@orpsandbox3.onmicrosoft.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-02T03:16:58.2883796Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:28.7082919Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0037295818328857422,\"allocatedStorageSizeInTbs\":0.025390625,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbadb76ai0207_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbadb76ai0207_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_dbadb76ai0207_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"dbadb76ai0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=haisu723.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadb76ai0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbadb76ai0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=haisu723.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadb76ai0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbadb76ai0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=haisu723.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadb76ai0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"dbadb76ai0207_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=haisu723.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadb76ai0207_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"dbadb76ai0207_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=haisu723.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadb76ai0207_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"dbadb76ai0207_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=haisu723.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_dbadb76ai0207_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://haisu723.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://haisu723.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://haisu723.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://haisu723.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://haisu723.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://haisu723.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DBADB76AI0207\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7tghi3viv524sykufpeeji5exiprtafsguqellr5qzsa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"haisu723.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.169\",\"privateEndpointLabel\":\"haisu723\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19/subnets/default2\",\"timeCreated\":\"2024-07-02T03:20:38.074Z\",\"timeLocalDataGuardEnabled\":\"Tue Jul 02 03:21:03 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/DBQAvNetJune19\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7tghi3viv524sykufpeeji5exiprtafsguqellr5qzsa\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Oracle.Database/autonomousDatabases/DRTesting3\",\"name\":\"DRTesting3\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-02T17:53:50.7197178Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-02T18:02:06.6722787Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"DRTesting3\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"permissionLevel\":\"Restricted\",\"lifecycleState\":\"Unavailable\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/daren_vnet/subnets/delegated\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/daren_vnet\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Oracle.Database/autonomousDatabases/DRTesting4\",\"name\":\"DRTesting4\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-02T18:20:25.1363748Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:33:25.1954727Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0044118762016296387,\"allocatedStorageSizeInTbs\":0.015625,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_drtesting4_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_drtesting4_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_drtesting4_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"drtesting4_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"drtesting4_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"drtesting4_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"drtesting4_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"drtesting4_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"drtesting4_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"drtesting4_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"drtesting4_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"drtesting4_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"drtesting4_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=oui8ipy0.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_drtesting4_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"DRTesting4\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqal4hrkuu4ru6hyjbdxq6246ee4gheuwccwuskk5dd7zpq?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"permissionLevel\":\"Restricted\",\"privateEndpoint\":\"oui8ipy0.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.163\",\"privateEndpointLabel\":\"oui8ipy0\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/daren_vnet/subnets/delegated\",\"timeCreated\":\"2024-07-02T18:24:07.208Z\",\"timeLocalDataGuardEnabled\":\"Tue Jul 02 18:24:23 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SmmAshRsGrp/providers/Microsoft.Network/virtualNetworks/daren_vnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqal4hrkuu4ru6hyjbdxq6246ee4gheuwccwuskk5dd7zpq\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Oracle.Database/autonomousDatabases/ADBScli\",\"name\":\"ADBScli\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-03T15:39:07.6884654Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-03T15:48:01.3159137Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2,\"computeModel\":\"ECPU\",\"dataStorageSizeInGbs\":32,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"ADBScli\",\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"lifecycleState\":\"Unavailable\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet/subnets/SDKSubnet\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"name\":\"OFakePowerShellTestAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T15:15:50.4761946Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:34:44.8861855Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.003295600414276123,\"allocatedStorageSizeInTbs\":0.0078125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":32,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"bqv0jquh.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.252\",\"privateEndpointLabel\":\"bqv0jquh\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"timeCreated\":\"2024-07-04T15:25:09.397Z\",\"timeLocalDataGuardEnabled\":\"Thu Jul 04 15:25:34 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FRA/providers/Oracle.Database/autonomousDatabases/drTestFra\",\"name\":\"drTestFra\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"germanywestcentral\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-04-15T16:02:44.1343493Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T15:34:06.5228918Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{},\"connectionUrls\":{},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"drTestFra\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error.\\nRefer to JobId f9a6ac41-42a5-413a-835e-e7640b84b605 and WorkRequestId c5b90218-7b0c-4403-a8f9-07bd3868270f when opening a Service Request at My Oracle Support.\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljrnirvylqauhrvo3vtmimgmdykypw2enp3oczwroh746z3wqufkvnq?region=eu-frankfurt-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"permissionLevel\":\"Restricted\",\"privateEndpointLabel\":\"r94ikkq5\",\"lifecycleState\":\"Unavailable\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FRA/providers/Microsoft.Network/virtualNetworks/drTestFra/subnets/default\",\"timeCreated\":\"2024-04-15T16:12:12.29Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FRA/providers/Microsoft.Network/virtualNetworks/drTestFra\",\"ocid\":\"ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljrnirvylqauhrvo3vtmimgmdykypw2enp3oczwroh746z3wqufkvnq\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tstpreprod16/providers/Oracle.Database/autonomousDatabases/orppreprodadbs162\",\"name\":\"orppreprodadbs162\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"germanywestcentral\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-16T18:33:16.1947327Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-16T21:47:24.6022635Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{},\"connectionUrls\":{},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"orppreprodadbs162\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error.\\nRefer to JobId a38db081-0474-46f6-877f-537f6ffe3904 and WorkRequestId 385a2543-c055-4b80-9dd6-7dc1621f8fc5 when opening a Service Request at My Oracle Support.\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljrnirvylqawg4w5clwl2tda3ibidx26jlnwlx26idsbd5qsu6i55ra?region=eu-frankfurt-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"permissionLevel\":\"Restricted\",\"privateEndpointLabel\":\"z8mizdig\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tstpreprod16/providers/Microsoft.Network/virtualNetworks/orp_preprod16_vnet2/subnets/orp_preprod16_subbnet2\",\"timeCreated\":\"2024-05-16T18:42:11.123Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tstpreprod16/providers/Microsoft.Network/virtualNetworks/orp_preprod16_vnet2\",\"ocid\":\"ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljrnirvylqawg4w5clwl2tda3ibidx26jlnwlx26idsbd5qsu6i55ra\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Oracle.Database/autonomousDatabases/OFakeSurya\",\"name\":\"OFakeSurya\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"germanywestcentral\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-22T18:48:44.0553017Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-22T22:16:38.4891057Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{},\"connectionUrls\":{},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"OFakeSurya\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error.\\nRefer to JobId a470e1b4-8bbc-4869-84cc-dbe1fe757bc0 and WorkRequestId 13de9343-1007-40d2-ac22-b879a0a95675 when opening a Service Request at My Oracle Support.\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljtnirvylqai5l2pwl73cc4xohqk5eybiepzegknn2id22bqln5ce3q?region=eu-frankfurt-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"permissionLevel\":\"Restricted\",\"privateEndpointLabel\":\"jhgix8mh\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FRA/providers/Microsoft.Network/virtualNetworks/CidrVnetFra1/subnets/delegated\",\"timeCreated\":\"2024-05-22T18:57:11.309Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/FRA/providers/Microsoft.Network/virtualNetworks/CidrVnetFra1\",\"ocid\":\"ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljtnirvylqai5l2pwl73cc4xohqk5eybiepzegknn2id22bqln5ce3q\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Oracle.Database/autonomousDatabases/OFakeSuryaAdbs\",\"name\":\"OFakeSuryaAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"germanywestcentral\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-22T19:11:28.8864347Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-22T22:31:38.2612597Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{},\"connectionUrls\":{},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"OFakeSuryaAdbs\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error.\\nRefer to JobId 543ffaf2-9c9d-4d42-9116-22a60a2228b1 and WorkRequestId 610b6cdd-5855-4672-bd3c-9a77b8cf9769 when opening a Service Request at My Oracle Support.\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljtnirvylqaksfrlerllhrhm5pjpkkwgsfzrfryqrqpkgsu64trwgma?region=eu-frankfurt-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"permissionLevel\":\"Restricted\",\"privateEndpointLabel\":\"uvmwsxfe\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Microsoft.Network/virtualNetworks/systemversionvnet/subnets/delegated\",\"timeCreated\":\"2024-05-22T19:18:40.874Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Microsoft.Network/virtualNetworks/systemversionvnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljtnirvylqaksfrlerllhrhm5pjpkkwgsfzrfryqrqpkgsu64trwgma\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Oracle.Database/autonomousDatabases/OFakeAdbs\",\"name\":\"OFakeAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"germanywestcentral\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-23T13:02:13.1645Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-23T16:17:52.9163787Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{},\"connectionUrls\":{},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"OFakeAdbs\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error.\\nRefer to JobId 90ad403c-8f94-4551-831d-386f2d4fa10f and WorkRequestId 24de3d8c-0e01-4141-a452-7923f6985c3f when opening a Service Request at My Oracle Support.\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljsnirvylqaeihs47hxkj4lsvh5gp3lj6ubfwvjfy2rrnmop2k77rwa?region=eu-frankfurt-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"permissionLevel\":\"Restricted\",\"privateEndpointLabel\":\"elsq6ezp\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Microsoft.Network/virtualNetworks/systemversionvnet/subnets/delegated\",\"timeCreated\":\"2024-05-23T13:06:04.233Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Microsoft.Network/virtualNetworks/systemversionvnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljsnirvylqaeihs47hxkj4lsvh5gp3lj6ubfwvjfy2rrnmop2k77rwa\",\"backupRetentionPeriodInDays\":60}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Oracle.Database/autonomousDatabases/AdbsTest\",\"name\":\"AdbsTest\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"germanywestcentral\",\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-05-23T15:57:33.3099925Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-05-23T19:17:53.7238101Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{},\"connectionUrls\":{},\"dataStorageSizeInGbs\":1024,\"dataStorageSizeInTbs\":1,\"dbVersion\":\"19c\",\"dbWorkload\":\"DW\",\"displayName\":\"AdbsTest\",\"isAutoScalingEnabled\":true,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"isMtlsConnectionRequired\":false,\"licenseModel\":\"LicenseIncluded\",\"lifecycleDetails\":\"The Autonomous Database operation failed due to an unknown error.\\nRefer to JobId 83704042-68ac-47b6-8fac-e9a4535b4fc8 and WorkRequestId 3ceae374-f9d6-4a8d-b270-f55a487e2477 when opening a Service Request at My Oracle Support.\",\"provisioningState\":\"Failed\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljsnirvylqalvuwrb25o42xa4zmlzp66ox5sdessi4aeqwzu2ehjnfq?region=eu-frankfurt-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"permissionLevel\":\"Restricted\",\"privateEndpointLabel\":\"gb3a5tvy\",\"lifecycleState\":\"Terminated\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Microsoft.Network/virtualNetworks/systemversionvnet/subnets/delegated\",\"timeCreated\":\"2024-05-23T16:01:13.689Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SystemVersions/providers/Microsoft.Network/virtualNetworks/systemversionvnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.eu-frankfurt-1.antheljsnirvylqalvuwrb25o42xa4zmlzp66ox5sdessi4aeqwzu2ehjnfq\",\"backupRetentionPeriodInDays\":60}}]}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+UpdateAdbs+$PATCH+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01", + "Content": "{\n \"tags\": {\n \"tagName\": \"tagValue\"\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "45" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"b60073ac-0000-0100-0000-6686c11c0000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/42CA3702B787BDD048CC8BF4654F12E5/E989A79E7814BEBAB190D7E3387335B8" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "977df7f9-62e6-48d3-8ddb-041be7fa4b19" ], + "x-ms-correlation-request-id": [ "89b04e96-6447-40bc-ab39-baab240f5c39" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153452Z:89b04e96-6447-40bc-ab39-baab240f5c39" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5EBC937B3455433EA7D5D7F5BDE8299E Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:50Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7827" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"name\":\"OFakePowerShellTestAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{\"tagName\":\"tagValue\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T15:15:50.4761946Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T15:34:51.1828761Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.003295600414276123,\"allocatedStorageSizeInTbs\":0.0078125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":32,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"bqv0jquh.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.252\",\"privateEndpointLabel\":\"bqv0jquh\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"timeCreated\":\"2024-07-04T15:25:09.397Z\",\"timeLocalDataGuardEnabled\":\"Thu Jul 04 15:25:34 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa\",\"backupRetentionPeriodInDays\":60}}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+UpdateAdbs+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "43" ], + "x-ms-client-request-id": [ "a544ed35-bf13-4337-956d-47c19456c198" ], + "CommandName": [ "Get-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "Get-AzOracleAutonomousDatabase_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"b60073ac-0000-0100-0000-6686c11c0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "2921f627-5270-423b-b46e-e77156c3bb70" ], + "x-ms-correlation-request-id": [ "88843fe6-694c-4120-8217-c663b8c1e5e9" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153453Z:88843fe6-694c-4120-8217-c663b8c1e5e9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 916AA35447D5461495B11DCD605CF0D4 Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:53Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7827" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"name\":\"OFakePowerShellTestAdbs\",\"type\":\"oracle.database/autonomousdatabases\",\"location\":\"eastus\",\"tags\":{\"tagName\":\"tagValue\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T15:15:50.4761946Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T15:34:51.1828761Z\"},\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.003295600414276123,\"allocatedStorageSizeInTbs\":0.0078125,\"autonomousMaintenanceScheduleType\":\"Regular\",\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{},\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=bqv0jquh.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"ordsUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://bqv0jquh.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"dataStorageSizeInGbs\":32,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lifecycleState\":\"Standby\"},\"isMtlsConnectionRequired\":false,\"licenseModel\":\"BringYourOwnLicense\",\"provisioningState\":\"Succeeded\",\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":\"https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"openMode\":\"ReadWrite\",\"privateEndpoint\":\"bqv0jquh.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.252\",\"privateEndpointLabel\":\"bqv0jquh\",\"lifecycleState\":\"Available\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"timeCreated\":\"2024-07-04T15:25:09.397Z\",\"timeLocalDataGuardEnabled\":\"Thu Jul 04 15:25:34 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-07T09:00:00Z\",\"timeMaintenanceEnd\":\"2024-07-07T11:00:00Z\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqasj6qcnuyarxbuqkejkxeaxwgmwtp2diqka3srtymhcfa\",\"backupRetentionPeriodInDays\":60}}", + "isContentBase64": false + } + }, + "AzAdbs+[NoContext]+DeleteAdbs+$DELETE+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "44" ], + "x-ms-client-request-id": [ "aa6d8c53-f38c-4701-8c0d-860a366fff87" ], + "CommandName": [ "Remove-AzOracleAutonomousDatabase" ], + "FullCommandName": [ "Remove-AzOracleAutonomousDatabase_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"b6007eac-0000-0100-0000-6686c11f0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/4876de14-d71b-47b4-9b54-785f1d98acf3*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557040955152149\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=r2S38yonGBLEQpNjNN2dwXHnpUkmz4MppCgBtID7IlHgE_Qe4rGHaMOo67gyStNQp6uBJy2rH0KcDH8ch9UAFftjXuf5mHwzcSpZ_HWWkXmZzjTjnzuGyeOKyTolYo22PIwTCLJrmysHF5kwjOJwu83PGQPVYDTcfrkOXVE5lGM0YFqwd7syEmf9Ed_NezyfXN9_6TeHrc9LDEmsHsX742ZVj3ErJ6s8wCcikNeDA0VuwREy5xwt9XjIg_WK9gu_VF49k0i8IHziIoRrSWyVdLZFiz5_8GV27sP7z6S2c_ojO7FNZgFQtbpHNylWmZ2q18CDYw--MigTY94Ds6oNcA\u0026h=Qi2Wg8RNdoYGnITRKQjZzh_oKEUznGz6r8a06Br00h4" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/097D321CDEB7C94C8A6340958D2E675E/AB1E99D0533649E9900D33405FB10DD0" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/4876de14-d71b-47b4-9b54-785f1d98acf3*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638557040954995969\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=PGWpy5lHA3kWlvEKedj2mkUbAvDc5_B4EgrbYy6NtzI1u7LDwhUY1xtWefoIdpmHJLDEyiv1hvLXZSliruWahE-H2nXSh9igd00tmtsLV5iKH9vcom3IwMgK7yeFjBCIiEQ3hsYkMg1LYCNQcsDoUJIq7eQuihoJUjDIEzNaC1z47bszQ4wsBwMy2wW_U-DcZOvkVt090C0sgwYbjQi9-49g9N8jDu8Lc5g559K9M4VBzj2ljRq4F0AqeK01jHRvfTBR78NygX0RJK2eg_FJkNs-laZvQo5Uu6filmnZdfbkvCyAsmO0pTYiO2hCba1y_ICeecx-JQF1piHqo7P6PQ\u0026h=sQgSTllSe9uE-9OBnx4plERP4nvJYkDwamhW9z5Vxd8" ], + "x-ms-request-id": [ "4876de14-d71b-47b4-9b54-785f1d98acf3" ], + "x-ms-correlation-request-id": [ "4bd36032-b222-495e-a71d-637522a44455" ], + "x-ms-ratelimit-remaining-subscription-global-deletes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T153455Z:4bd36032-b222-495e-a71d-637522a44455" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 014879F49D3D453CBD5E3CEE257D914F Ref B: AMS231022012021 Ref C: 2024-07-04T15:34:53Z" ], + "Date": [ "Thu, 04 Jul 2024 15:34:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/AzAdbs.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/AzAdbs.Tests.ps1 new file mode 100644 index 000000000000..e86a93368648 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzAdbs.Tests.ps1 @@ -0,0 +1,50 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzAdbs')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzAdbs.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'AzAdbs' { + It 'CreateAdbs' { + { + [SecureString]$adbsAdminPassword = ConvertTo-SecureString -String "PowerShellTestPass123" -AsPlainText -Force + $adbs = New-AzOracleAutonomousDatabase -Name $env.adbsName -ResourceGroupName $env.resourceGroup -Location $env.location -DisplayName $env.adbsName -DbWorkload $env.adbsDbWorkload -ComputeCount $env.adbsComputeCount -ComputeModel $env.adbsComputeModel -DbVersion $env.adbsDbVersion -DataStorageSizeInGb $env.adbsDataStorageInGb -AdminPassword $adbsAdminPassword -LicenseModel $env.adbsLicenseModel -SubnetId $env.subnetId -VnetId $env.vnetId -DataBaseType $env.adbsDatabaseType -CharacterSet $env.adbsCharacterSet -NcharacterSet $env.adbsNCharacterSet + $adbs.Name | Should -Be $env.adbsName + } | Should -Not -Throw + } + It 'GetAdbs' { + { + $adbs = Get-AzOracleAutonomousDatabase -Name $env.adbsName -ResourceGroupName $env.resourceGroup + $adbs.Name | Should -Be $env.adbsName + } | Should -Not -Throw + } + It 'ListAdbs' { + { + $adbsList = Get-AzOracleAutonomousDatabase + $adbsList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + It 'UpdateAdbs' { + { + $tagHashTable = @{'tagName'="tagValue"} + Update-AzOracleAutonomousDatabase -Name $env.adbsName -ResourceGroupName $env.resourceGroup -Tag $tagHashTable + $adbs = Get-AzOracleAutonomousDatabase -Name $env.adbsName -ResourceGroupName $env.resourceGroup + $adbs.Tag.Get_Item("tagName") | Should -Be "tagValue" + } | Should -Not -Throw + } + It 'DeleteAdbs' { + { + Remove-AzOracleAutonomousDatabase -NoWait -Name $env.adbsName -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Recording.json b/src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Recording.json new file mode 100644 index 000000000000..24770b84ec21 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Recording.json @@ -0,0 +1,131 @@ +{ + "AzAdbsBackup+[NoContext]+CreateAdbsBackup+$PUT+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups/testId12345?api-version=2023-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups/testId12345?api-version=2023-09-01", + "Content": "{\n \"properties\": {\n \"retentionPeriodInDays\": 90\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "57" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"1e089e05-0000-0100-0000-668faea80000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/6E85E378BA1E8263F1657F7DD9200A7F/972465A8DBA92104D451D584187C8C92" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/2c7aed69-6ea5-4476-9307-2fd88e6c93ed*50FECF178ACD34FE40AACCB411C9742F70E182BA5ED93F444FBA5C58FA650B0D?api-version=2023-09-01\u0026t=638562891930500827\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=DShNBTuWGpEINtqFzCxsBPi7tmwKQ1PyLFTIooy_pv2DLIjlrFC6nAmpAOmBk7otUGuywmCE29r_PSl0yaY7FFXVBSFf82nQhhIBqG1Cmy2QrTL2bDFWOqNO3IpJ8bMr3YMmkov0P-rcIVf9FqVPsNZjf0u9rbMQd6-J3_PzszE0qQIZ6-A9pNuXxIrVibVACMYLOrTHsR7b1xFDHPxHxTTGYMJiSKOvnn2kGoXgYDtfZnBIzJjDj8TFaGim3fLyYAoIECXDXJZqeeMdgC_gLg1U77Zr9nfDW3lpthxJkQFmU37I5tNf1kT5LbEdD4ygitRww_ODR8K17C2gnOwkyA\u0026h=wDp0AaFzXA-QdWPGXUIBtRxl8skbxNiPIhPkRxgpdwY" ], + "x-ms-request-id": [ "2c7aed69-6ea5-4476-9307-2fd88e6c93ed" ], + "x-ms-correlation-request-id": [ "41dd0126-7aba-405c-92c3-20444164d1dd" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T100633Z:41dd0126-7aba-405c-92c3-20444164d1dd" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 294C2BC0C508468B839A435CD4AA4BC8 Ref B: AMS231032607035 Ref C: 2024-07-11T10:06:30Z" ], + "Date": [ "Thu, 11 Jul 2024 10:06:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "896" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups/testId12345\",\"name\":\"testId12345\",\"type\":\"oracle.database/autonomousdatabases/autonomousdatabasebackups\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-11T10:06:30.9562116Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-11T10:06:30.9562116Z\"},\"properties\":{\"autonomousDatabaseOcid\":null,\"databaseSizeInTbs\":null,\"dbVersion\":null,\"displayName\":null,\"ocid\":null,\"isAutomatic\":null,\"isRestorable\":null,\"lifecycleDetails\":null,\"lifecycleState\":\"Creating\",\"retentionPeriodInDays\":90,\"sizeInTbs\":null,\"timeAvailableTil\":null,\"timeStarted\":null,\"timeEnded\":null,\"backupType\":null,\"provisioningState\":\"Accepted\"}}", + "isContentBase64": false + } + }, + "AzAdbsBackup+[NoContext]+ListAdbsBackups+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "94271f50-adac-47d7-90ed-6659af2f1055" ], + "CommandName": [ "Get-AzOracleAutonomousDatabaseBackup" ], + "FullCommandName": [ "Get-AzOracleAutonomousDatabaseBackup_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/1ADA7F157040AF71622EBBE76571FC76/34C6F58F23B5DEC79D315263B0D7CC8F" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "eaf13c6c-6eae-4344-b1f1-592e88ca8dce" ], + "x-ms-correlation-request-id": [ "c005ba18-6dae-4181-9e93-05923e99db2d" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T101111Z:c005ba18-6dae-4181-9e93-05923e99db2d" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 999BE306B1CE47F8B5C99C9AC1E3A2A8 Ref B: AMS231020614047 Ref C: 2024-07-11T10:11:08Z" ], + "Date": [ "Thu, 11 Jul 2024 10:11:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1915" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups/2024-07-11T10:04:35.000Z\",\"name\":\"autonomousdatabasebackup20240711100337\",\"type\":\"Longterm\",\"properties\":{\"autonomousDatabaseOcid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaawhqnicickxllrvrtu4m4bzc7q5vewtvyfg55u4rlxha\",\"databaseSizeInTbs\":null,\"dbVersion\":\"19c\",\"displayName\":\"autonomousdatabasebackup20240711100337\",\"ocid\":\"ocid1.autonomousdatabasebackup.oc1.iad.anuwcljtowjpydqa7hdlpku3veh2wtc27johkbzjdpmuh4svbnk5ppjpfvnq\",\"isAutomatic\":false,\"isRestorable\":null,\"lifecycleDetails\":null,\"lifecycleState\":\"Active\",\"retentionPeriodInDays\":90,\"sizeInTbs\":0.004061222076416016,\"timeAvailableTil\":\"2024-10-09T10:03:56.000Z\",\"timeStarted\":\"2024-07-11T10:03:37.825Z\",\"timeEnded\":\"2024-07-11T10:04:35.000Z\",\"backupType\":\"LongTerm\",\"provisioningState\":\"Active\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups/2024-07-11T09:59:51.000Z\",\"name\":\"autonomousdatabasebackup20240711095849\",\"type\":\"Longterm\",\"properties\":{\"autonomousDatabaseOcid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaawhqnicickxllrvrtu4m4bzc7q5vewtvyfg55u4rlxha\",\"databaseSizeInTbs\":null,\"dbVersion\":\"19c\",\"displayName\":\"autonomousdatabasebackup20240711095849\",\"ocid\":\"ocid1.autonomousdatabasebackup.oc1.iad.anuwcljtowjpydqa5vnjxrsk62lfdu23latr5j7jbnaipgowfmawtcptqzea\",\"isAutomatic\":false,\"isRestorable\":null,\"lifecycleDetails\":null,\"lifecycleState\":\"Active\",\"retentionPeriodInDays\":90,\"sizeInTbs\":0.004061222076416016,\"timeAvailableTil\":\"2024-10-09T09:59:08.000Z\",\"timeStarted\":\"2024-07-11T09:58:49.310Z\",\"timeEnded\":\"2024-07-11T09:59:51.000Z\",\"backupType\":\"LongTerm\",\"provisioningState\":\"Active\"}}]}", + "isContentBase64": false + } + }, + "AzAdbsBackup+[NoContext]+DeleteAdbsBackup+$DELETE+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups/testId12345?api-version=2023-09-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/autonomousDatabaseBackups/testId12345?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "b93599bb-90ee-49aa-a795-7e8f995b1a2c" ], + "CommandName": [ "Remove-AzOracleAutonomousDatabaseBackup" ], + "FullCommandName": [ "Remove-AzOracleAutonomousDatabaseBackup_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "00000000-0000-0000-0000-000000000000" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "199" ], + "x-ms-ratelimit-remaining-subscription-global-deletes": [ "2999" ], + "x-ms-correlation-request-id": [ "59ff18b8-635a-46f2-b937-7c9915024fd7" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T101004Z:59ff18b8-635a-46f2-b937-7c9915024fd7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8974FF5465714ADBA32FDF45E85FB48F Ref B: AMS231020512045 Ref C: 2024-07-11T10:10:03Z" ], + "Date": [ "Thu, 11 Jul 2024 10:10:03 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} diff --git a/src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Tests.ps1 new file mode 100644 index 000000000000..340d4f325794 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzAdbsBackup.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzAdbsBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzAdbsBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'AzAdbsBackup' { + It 'CreateAdbsBackup' { + { + New-AzOracleAutonomousDatabaseBackup -NoWait -Adbbackupid $env.adbsBackupId -Autonomousdatabasename $env.adbsName -ResourceGroupName $env.resourceGroup -RetentionPeriodInDay 90 + } | Should -Not -Throw + } + It 'ListAdbsBackups' { + { + Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename $env.adbsName -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } + It 'DeleteAdbsBackup' { + { + Remove-AzOracleAutonomousDatabaseBackup -NoWait -Adbbackupid $env.adbsBackupId -Autonomousdatabasename $env.adbsName -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/AzExaInfra.Recording.json b/src/Oracle/Oracle.Autorest/test/AzExaInfra.Recording.json new file mode 100644 index 000000000000..aaee73e179f4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzExaInfra.Recording.json @@ -0,0 +1,532 @@ +{ + "AzExaInfra+[NoContext]+CreateExaInfra+$PUT+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01", + "Content": "{\n \"location\": \"eastus\",\n \"properties\": {\n \"computeCount\": 3,\n \"storageCount\": 3,\n \"shape\": \"Exadata.X9M\",\n \"displayName\": \"OFake_PowerShellTestExaInfra\"\n },\n \"zones\": [ \"2\" ]\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "193" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"1f019394-0000-0100-0000-6686a04b0000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/31D2A143E7A9D0FA065EA3D039DE0447/D6DAE598360A633DD01FE2E99C0E5051" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k" ], + "x-ms-request-id": [ "30e07029-5ae7-4745-97e7-37d6e53f939b" ], + "x-ms-correlation-request-id": [ "a0d786ba-203d-40a3-b6bd-6a51056adfdd" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131452Z:a0d786ba-203d-40a3-b6bd-6a51056adfdd" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 07F61A9A773E4D91B15BE2F346843950 Ref B: AMS231032607011 Ref C: 2024-07-04T13:14:44Z" ], + "Date": [ "Thu, 04 Jul 2024 13:14:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1349" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"name\":\"OFake_PowerShellTestExaInfra\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"2\"],\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T13:14:45.3380609Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T13:14:45.3380609Z\"},\"properties\":{\"ocid\":null,\"computeCount\":3,\"storageCount\":3,\"totalStorageSizeInGbs\":null,\"availableStorageSizeInGbs\":null,\"timeCreated\":null,\"lifecycleDetails\":null,\"maintenanceWindow\":null,\"estimatedPatchingTime\":null,\"customerContacts\":null,\"provisioningState\":\"Accepted\",\"lifecycleState\":null,\"shape\":\"Exadata.X9M\",\"ociUrl\":null,\"displayName\":\"OFake_PowerShellTestExaInfra\",\"cpuCount\":null,\"maxCpuCount\":null,\"memorySizeInGbs\":null,\"maxMemoryInGbs\":null,\"dbNodeStorageSizeInGbs\":null,\"maxDbNodeStorageSizeInGbs\":null,\"dataStorageSizeInTbs\":null,\"maxDataStorageInTbs\":null,\"dbServerVersion\":null,\"activatedStorageCount\":null,\"additionalStorageCount\":null,\"lastMaintenanceRunId\":null,\"nextMaintenanceRunId\":null,\"monthlyDbServerVersion\":null,\"monthlyStorageServerVersion\":null,\"storageServerVersion\":null}}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+CreateExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "f5c69c1c-0788-419c-8c52-470a0c276384" ], + "CommandName": [ "New-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "New-AzOracleCloudExadataInfrastructure_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900d21f-0000-0100-0000-6686a0490000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "7103f76a-be05-421e-8316-ade910ae6a4f" ], + "x-ms-correlation-request-id": [ "acd43300-e9d0-4ee3-9ce1-9ae539417d70" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131522Z:acd43300-e9d0-4ee3-9ce1-9ae539417d70" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 14A8D391D5EB4FAF96E910D445568E03 Ref B: AMS231032607011 Ref C: 2024-07-04T13:15:22Z" ], + "Date": [ "Thu, 04 Jul 2024 13:15:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "579" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"name\":\"30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"status\":\"Accepted\",\"startTime\":\"2024-07-04T13:14:49.2941575Z\"}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+CreateExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "f5c69c1c-0788-419c-8c52-470a0c276384" ], + "CommandName": [ "New-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "New-AzOracleCloudExadataInfrastructure_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900d21f-0000-0100-0000-6686a0490000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "dd9efc27-fef2-4713-bc84-e94699af92cb" ], + "x-ms-correlation-request-id": [ "d346c179-11e9-4627-9612-13f6c6aa1838" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131553Z:d346c179-11e9-4627-9612-13f6c6aa1838" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: F26F1BAF75D54098ACBCB336A4ACB406 Ref B: AMS231032607011 Ref C: 2024-07-04T13:15:52Z" ], + "Date": [ "Thu, 04 Jul 2024 13:15:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "579" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"name\":\"30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"status\":\"Accepted\",\"startTime\":\"2024-07-04T13:14:49.2941575Z\"}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+CreateExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "f5c69c1c-0788-419c-8c52-470a0c276384" ], + "CommandName": [ "New-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "New-AzOracleCloudExadataInfrastructure_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39005422-0000-0100-0000-6686a09f0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "11586a87-1a98-4cef-808d-84a0dd733173" ], + "x-ms-correlation-request-id": [ "e905684c-bff1-4c50-a843-4cdb80401ef1" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131623Z:e905684c-bff1-4c50-a843-4cdb80401ef1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C111F537181D4D5187ECFBA88C994A57 Ref B: AMS231032607011 Ref C: 2024-07-04T13:16:23Z" ], + "Date": [ "Thu, 04 Jul 2024 13:16:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "643" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"name\":\"30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T13:14:49.2941575Z\",\"endTime\":\"2024-07-04T13:16:15.465Z\",\"percentComplete\":75.0}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+CreateExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "f5c69c1c-0788-419c-8c52-470a0c276384" ], + "CommandName": [ "New-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "New-AzOracleCloudExadataInfrastructure_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39005422-0000-0100-0000-6686a09f0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "b3348945-e815-4c29-a088-02d983ad3bca" ], + "x-ms-correlation-request-id": [ "91c241a7-ccf7-43ab-be5c-fd57d0f0caf5" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131654Z:91c241a7-ccf7-43ab-be5c-fd57d0f0caf5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 955A4FBD0FA94DF4872C077FDA257676 Ref B: AMS231032607011 Ref C: 2024-07-04T13:16:54Z" ], + "Date": [ "Thu, 04 Jul 2024 13:16:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "643" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"name\":\"30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T13:14:49.2941575Z\",\"endTime\":\"2024-07-04T13:16:15.465Z\",\"percentComplete\":75.0}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+CreateExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556956920256023\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iRrjcvRD38rG_AI69jV6yme1hxhJqEQnemOI7ByTAf9V-F_r19ggZiiZMnb0qzTYucNoyg1OLjNbEyvXNbZcNsrLJ_w6nVp6Gf9pJ0hqItKeTmKf6NneEWd7VOPv6RhZfdPAfagW9rJupkG9zLI99irPOjqXx8uM-aJTWT1Nfi_ks1sHg77RwHqbVwQWLvGsHPi1DdmRtnvSlmiJ3_OeYxJz5PS_Upu0nCnc3LaXTMPqXZutwcRTjzX84EjIvaeKu-CMMBJAIan-bDM52YrLHplJHvQXIVHJfQdbVNdrYVVeP7ZcIHcMc8_UcUugQNd4c7YcMhqIbwYvOg0rdQ-d1g\u0026h=sjmUvMpclX8I_JwGUbG9lfT6-s5yVD5TCrJikC99K0k", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "f5c69c1c-0788-419c-8c52-470a0c276384" ], + "CommandName": [ "New-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "New-AzOracleCloudExadataInfrastructure_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39006923-0000-0100-0000-6686a0c80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "7e556a75-882e-4314-82e2-dc95c875b13b" ], + "x-ms-correlation-request-id": [ "b86c3a4c-f51c-4cc6-a291-422d7b889623" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131724Z:b86c3a4c-f51c-4cc6-a291-422d7b889623" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 48EA0452D04A499D9AFB6ED4CCF1733B Ref B: AMS231032607011 Ref C: 2024-07-04T13:17:24Z" ], + "Date": [ "Thu, 04 Jul 2024 13:17:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "662" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"name\":\"30e07029-5ae7-4745-97e7-37d6e53f939b*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"status\":\"Succeeded\",\"startTime\":\"2024-07-04T13:14:49.2941575Z\",\"endTime\":\"2024-07-04T13:16:56.062437Z\",\"percentComplete\":100.0,\"properties\":null}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+CreateExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "f5c69c1c-0788-419c-8c52-470a0c276384" ], + "CommandName": [ "New-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "New-AzOracleCloudExadataInfrastructure_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"1f018ba2-0000-0100-0000-6686a0c80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "2fbc66d0-f2a2-47ed-ace3-e2410c40aa1e" ], + "x-ms-correlation-request-id": [ "f64a6d23-8ddd-4bd9-acb9-0993fb048da2" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131725Z:f64a6d23-8ddd-4bd9-acb9-0993fb048da2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 953A8840ADB24620AAD2A16E06D6284D Ref B: AMS231032607011 Ref C: 2024-07-04T13:17:25Z" ], + "Date": [ "Thu, 04 Jul 2024 13:17:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1724" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"name\":\"OFake_PowerShellTestExaInfra\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"2\"],\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T13:14:45.3380609Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T13:16:56.5119492Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q\",\"computeCount\":3,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":196608,\"timeCreated\":\"2024-07-04T13:15:00.874Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake_PowerShellTestExaInfra\",\"cpuCount\":0,\"maxCpuCount\":378,\"memorySizeInGbs\":0,\"maxMemoryInGbs\":4170,\"dbNodeStorageSizeInGbs\":0,\"maxDbNodeStorageSizeInGbs\":6729,\"dataStorageSizeInTbs\":0.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"23.1.13.0.0.240410.1\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"21.1.0.0.0\"}}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+GetExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "9582c8f1-4c54-4f9b-ab9f-faf3bbb3e185" ], + "CommandName": [ "Get-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "Get-AzOracleCloudExadataInfrastructure_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"1f018ba2-0000-0100-0000-6686a0c80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "248" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "2886410c-dbef-446e-a4ca-3a07c4d4fc9d" ], + "x-ms-correlation-request-id": [ "e3eefe74-b458-46e8-b769-bc270c93ea18" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3748" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131726Z:e3eefe74-b458-46e8-b769-bc270c93ea18" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 26D9BF8D5956432498A093A20FFCF7B7 Ref B: AMS231032607011 Ref C: 2024-07-04T13:17:25Z" ], + "Date": [ "Thu, 04 Jul 2024 13:17:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1724" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"name\":\"OFake_PowerShellTestExaInfra\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"2\"],\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T13:14:45.3380609Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T13:16:56.5119492Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q\",\"computeCount\":3,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":196608,\"timeCreated\":\"2024-07-04T13:15:00.874Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake_PowerShellTestExaInfra\",\"cpuCount\":0,\"maxCpuCount\":378,\"memorySizeInGbs\":0,\"maxMemoryInGbs\":4170,\"dbNodeStorageSizeInGbs\":0,\"maxDbNodeStorageSizeInGbs\":6729,\"dataStorageSizeInTbs\":0.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"23.1.13.0.0.240410.1\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"21.1.0.0.0\"}}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+ListExaInfras+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/cloudExadataInfrastructures?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/cloudExadataInfrastructures?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "c37ba9fe-de87-489e-9591-c5f0a90474cd" ], + "CommandName": [ "Get-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "Get-AzOracleCloudExadataInfrastructure_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-original-request-ids": [ "bbc040dc-56ed-4f59-8568-d3a40fa0fb00", "97bc8ac4-79a8-44df-bd03-5668e2a133bb" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-request-id": [ "44b3e49c-aa62-4076-927b-4adb97b9e213" ], + "x-ms-correlation-request-id": [ "44b3e49c-aa62-4076-927b-4adb97b9e213" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131726Z:44b3e49c-aa62-4076-927b-4adb97b9e213" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 66B31B999A9C4F70ABFEDD22F9796C1B Ref B: AMS231032607011 Ref C: 2024-07-04T13:17:26Z" ], + "Date": [ "Thu, 04 Jul 2024 13:17:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5481" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/cloudExadataInfrastructures/OFake-tags-test\",\"name\":\"OFake-tags-test\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"3\"],\"tags\":{},\"systemData\":{\"createdBy\":\"luis.plancarte@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T03:53:24.6527397Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T13:03:19.5734566Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljtnirvylqaccj5lnefuftfisg5fg6x2q4ptaplqvijvu4dzmitr5la\",\"computeCount\":2,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":0,\"timeCreated\":\"2024-07-04T03:53:37.122Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"leadTimeInWeeks\":0,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljtnirvylqaccj5lnefuftfisg5fg6x2q4ptaplqvijvu4dzmitr5la?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake-tags-test\",\"cpuCount\":4,\"maxCpuCount\":252,\"memorySizeInGbs\":60,\"maxMemoryInGbs\":2780,\"dbNodeStorageSizeInGbs\":878,\"maxDbNodeStorageSizeInGbs\":4486,\"dataStorageSizeInTbs\":2.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"23.1.13.0.0.240410.1\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"21.1.0.0.0\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"name\":\"OFake_PowerShellTestExaInfra\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"2\"],\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T13:14:45.3380609Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T13:16:56.5119492Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q\",\"computeCount\":3,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":196608,\"timeCreated\":\"2024-07-04T13:15:00.874Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake_PowerShellTestExaInfra\",\"cpuCount\":0,\"maxCpuCount\":378,\"memorySizeInGbs\":0,\"maxMemoryInGbs\":4170,\"dbNodeStorageSizeInGbs\":0,\"maxDbNodeStorageSizeInGbs\":6729,\"dataStorageSizeInTbs\":0.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"23.1.13.0.0.240410.1\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"21.1.0.0.0\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ObsTestingFra/providers/Oracle.Database/cloudExadataInfrastructures/OFake_ppratees_0216_2\",\"name\":\"OFake_ppratees_0216_2\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"germanywestcentral\",\"zones\":[\"1\"],\"tags\":{\"aa\":\"aa\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-02-16T20:24:39.2647464Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T13:03:57.7499028Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.eu-frankfurt-1.antheljsnirvylqarzhllfgbwoe5cqsbbdbqsm3uhzcfrcekxecberctsrja\",\"computeCount\":2,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":0,\"timeCreated\":\"2024-02-16T20:26:30.429Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"leadTimeInWeeks\":0,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Failed\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.eu-frankfurt-1.antheljsnirvylqarzhllfgbwoe5cqsbbdbqsm3uhzcfrcekxecberctsrja?region=eu-frankfurt-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake_ppratees_0216_2\",\"cpuCount\":8,\"maxCpuCount\":252,\"memorySizeInGbs\":120,\"maxMemoryInGbs\":2780,\"dbNodeStorageSizeInGbs\":1756,\"maxDbNodeStorageSizeInGbs\":4486,\"dataStorageSizeInTbs\":4.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"19.12.1.0.0.0\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"19.12.1.0.0.0\",\"lifecycleState\":\"Available\",\"nextMaintenanceRunId\":\"ocid1.dbmaintenancerun.oc1.eu-frankfurt-1.antheljsnirvylqahi5uelms6eoacvxn3jqn75gfwfgddpanct3z3zu6yloa\",\"lastMaintenanceRunId\":\"ocid1.dbmaintenancerun.oc1.eu-frankfurt-1.antheljsnirvylqahi5uelms6eoacvxn3jqn75gfwfgddpanct3z3zu6yloa\"}}]}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+UpdateExaInfra+$PATCH+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01", + "Content": "{\n \"tags\": {\n \"tagName\": \"tagValue\"\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "45" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"1f0109a6-0000-0100-0000-6686a0e80000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/E869DABA481F29517A6E8EFE63C4FC91/324F5A9BF0CA7865A66CED1E1D6D5C85" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "e44e1fc5-8d9b-4134-840d-3f8f2c2b22c0" ], + "x-ms-correlation-request-id": [ "d7a92c3b-6432-4957-8696-adb90825e855" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131729Z:d7a92c3b-6432-4957-8696-adb90825e855" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 316B1FDDC8A144389F88ABE87E17345C Ref B: AMS231032607011 Ref C: 2024-07-04T13:17:26Z" ], + "Date": [ "Thu, 04 Jul 2024 13:17:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1736" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"name\":\"OFake_PowerShellTestExaInfra\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"2\"],\"tags\":{\"tagName\":\"tagValue\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T13:14:45.3380609Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T13:17:27.5586053Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q\",\"computeCount\":3,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":196608,\"timeCreated\":\"2024-07-04T13:15:00.874Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake_PowerShellTestExaInfra\",\"cpuCount\":0,\"maxCpuCount\":378,\"memorySizeInGbs\":0,\"maxMemoryInGbs\":4170,\"dbNodeStorageSizeInGbs\":0,\"maxDbNodeStorageSizeInGbs\":6729,\"dataStorageSizeInTbs\":0.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"23.1.13.0.0.240410.1\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"21.1.0.0.0\"}}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+UpdateExaInfra+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "246082b8-0f7a-4b9d-b68b-b76f226c2965" ], + "CommandName": [ "Get-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "Get-AzOracleCloudExadataInfrastructure_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"1f0109a6-0000-0100-0000-6686a0e80000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "3dd2bac4-345d-4e6c-be8d-fa40eb7276a4" ], + "x-ms-correlation-request-id": [ "bbf450f7-0c85-4184-9107-ca24a9616b07" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131730Z:bbf450f7-0c85-4184-9107-ca24a9616b07" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0E172B89F04A42B8A407657C5A372D32 Ref B: AMS231032607011 Ref C: 2024-07-04T13:17:29Z" ], + "Date": [ "Thu, 04 Jul 2024 13:17:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1736" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"name\":\"OFake_PowerShellTestExaInfra\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"2\"],\"tags\":{\"tagName\":\"tagValue\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T13:14:45.3380609Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T13:17:27.5586053Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q\",\"computeCount\":3,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":196608,\"timeCreated\":\"2024-07-04T13:15:00.874Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqay2vpdjv6s2m24jkmodn6g5r7wvpdu4653upd5zoox22q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake_PowerShellTestExaInfra\",\"cpuCount\":0,\"maxCpuCount\":378,\"memorySizeInGbs\":0,\"maxMemoryInGbs\":4170,\"dbNodeStorageSizeInGbs\":0,\"maxDbNodeStorageSizeInGbs\":6729,\"dataStorageSizeInTbs\":0.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"23.1.13.0.0.240410.1\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"21.1.0.0.0\"}}", + "isContentBase64": false + } + }, + "AzExaInfra+[NoContext]+DeleteExaInfra+$DELETE+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "478a4c5c-cf30-448a-afb9-038c05d83c16" ], + "CommandName": [ "Remove-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "Remove-AzOracleCloudExadataInfrastructure_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"1f0153a6-0000-0100-0000-6686a0eb0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/ef0d8344-55e2-4c39-a4b1-531f57fae7b9*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556958519971200\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=hlgRBu92u4cz-JTfHcVtlTwuCUrqZdRVsiKMYfYO3fBA-kjf8B_5oIOwB_ec7Cl7LzmH2D6btNO4c-kVUlBhYTXj-hw5J_ByGNThMxOSuS51VMc6Qlfpi0OC9DdgK01mhXlojzUEFZr8ri8aPHNTdpLOOylVAIfhHgyZiQn8vZ5E523bLJ2yVy2NcGd2QdyfS8_xngtH61sace7u7MEanZ118x8mVLCQ5aAswa9D160zBUpX5SGaQ-uHlrD5ka7Ac5ZZgVF-7k1xYavIYpXvrWyFgeyEBTlGV06H14MC1_AaRONrneUDCX0YVQl2qraDVLIQ-l0hyNZbaJGlV9Aezw\u0026h=0sK1JqVsJ-CjsHO7GjVMlNcarCi203ZAWmLu9aSOC7U" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/7245428C82109D925012905AE22391E6/0E72F6238871F1375E6D030C622C7959" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/ef0d8344-55e2-4c39-a4b1-531f57fae7b9*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-version=2023-09-01\u0026t=638556958519816246\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=WtqHFofSTok0eemg8N0d8-ZAg5Myjha9BemYtvyAie_140tcjfD9WbSE7EO0EfpsKj4TZVhI13wseKT7U1PyCcpNVRNnTm-9HqfEJ6K136mfk778QMjoLMYAdZ4cKd7_lrKFNDHwgBmTOaPyST6oZp2LPiF06HRQ-r84VtvF77dCD5emNKKZfRflaqOr0SWKZNNVt3IDIDYCLGsBJsQ4S-mBaTqNhR-qfey9d8A58fC8L1L1nUpasHAjHZpCVJBTSOUCniIshRtO_d_d7R32-0kTrI6puMVFaOXOv2wZTGeGzdk1KQasZL6p-4RHGkMH8SIYHAtw9kOAGXbZ4EOjiA\u0026h=EPe5VhVXM9ojFfDsnI6-_YOZxEvC18mVb_SXDA5gJY0" ], + "x-ms-request-id": [ "ef0d8344-55e2-4c39-a4b1-531f57fae7b9" ], + "x-ms-correlation-request-id": [ "8270985d-fdb6-449f-9d49-8eeae5394674" ], + "x-ms-ratelimit-remaining-subscription-global-deletes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T131731Z:8270985d-fdb6-449f-9d49-8eeae5394674" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0E9FDF72F45F4B82A4B5DD07AA7D9E4E Ref B: AMS231032607011 Ref C: 2024-07-04T13:17:30Z" ], + "Date": [ "Thu, 04 Jul 2024 13:17:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/AzExaInfra.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/AzExaInfra.Tests.ps1 new file mode 100644 index 000000000000..de5c97ad3ffc --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzExaInfra.Tests.ps1 @@ -0,0 +1,49 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzExaInfra')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzExaInfra.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'AzExaInfra' { + It 'CreateExaInfra' { + { + $exaInfra = New-AzOracleCloudExadataInfrastructure -Name $env.exaInfraName -ResourceGroupName $env.resourceGroup -Location $env.location -Zone $env.zone -Shape $env.exaInfraShape -ComputeCount $env.exaInfraComputeCount -StorageCount $env.exaInfraStorageCount -DisplayName $env.exaInfraName + $exaInfra.Name | Should -Be $env.exaInfraName + } | Should -Not -Throw + } + It 'GetExaInfra' { + { + $exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $env.exaInfraName -ResourceGroupName $env.resourceGroup + $exaInfra.Name | Should -Be $env.exaInfraName + } | Should -Not -Throw + } + It 'ListExaInfras' { + { + $exaInfraList = Get-AzOracleCloudExadataInfrastructure + $exaInfraList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + It 'UpdateExaInfra' { + { + $tagHashTable = @{'tagName'="tagValue"} + Update-AzOracleCloudExadataInfrastructure -Name $env.exaInfraName -ResourceGroupName $env.resourceGroup -Tag $tagHashTable + $exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $env.exaInfraName -ResourceGroupName $env.resourceGroup + $exaInfra.Tag.Get_Item("tagName") | Should -Be "tagValue" + } | Should -Not -Throw + } + It 'DeleteExaInfra' { + { + Remove-AzOracleCloudExadataInfrastructure -NoWait -Name $env.exaInfraName -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/AzVmCluster.Recording.json b/src/Oracle/Oracle.Autorest/test/AzVmCluster.Recording.json new file mode 100644 index 000000000000..3ae8e1aebad4 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzVmCluster.Recording.json @@ -0,0 +1,1496 @@ +{ + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "93727332-df35-4dca-8852-0d80d4e06063" ], + "CommandName": [ "Get-AzOracleCloudExadataInfrastructure" ], + "FullCommandName": [ "Get-AzOracleCloudExadataInfrastructure_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"20014d7e-0000-0100-0000-6686a8260000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "0b68189a-d573-4fc4-b554-d6a866af23b1" ], + "x-ms-correlation-request-id": [ "b31643d9-bf2e-4ed1-8084-aa3bc6018727" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKWEST:20240704T140050Z:b31643d9-bf2e-4ed1-8084-aa3bc6018727" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 01DBD3698AC9473F8E0F366D5B613AEE Ref B: AMS231020512045 Ref C: 2024-07-04T14:00:50Z" ], + "Date": [ "Thu, 04 Jul 2024 14:00:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1753" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"name\":\"OFake_PowerShellTestExaInfra\",\"type\":\"oracle.database/cloudexadatainfrastructures\",\"location\":\"eastus\",\"zones\":[\"2\"],\"tags\":{},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T13:20:00.3149197Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T13:48:22.0837021Z\"},\"properties\":{\"ocid\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q\",\"computeCount\":3,\"storageCount\":3,\"totalStorageSizeInGbs\":196608,\"availableStorageSizeInGbs\":0,\"timeCreated\":\"2024-07-04T13:20:13.877Z\",\"maintenanceWindow\":{\"preference\":\"NoPreference\",\"leadTimeInWeeks\":0,\"patchingMode\":\"Rolling\",\"customActionTimeoutInMins\":0,\"isCustomActionTimeoutEnabled\":false},\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"shape\":\"Exadata.X9M\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"displayName\":\"OFake_PowerShellTestExaInfra\",\"cpuCount\":6,\"maxCpuCount\":378,\"memorySizeInGbs\":90,\"maxMemoryInGbs\":4170,\"dbNodeStorageSizeInGbs\":1317,\"maxDbNodeStorageSizeInGbs\":6729,\"dataStorageSizeInTbs\":2.0,\"maxDataStorageInTbs\":192.0,\"dbServerVersion\":\"23.1.13.0.0.240410.1\",\"activatedStorageCount\":3,\"additionalStorageCount\":0,\"storageServerVersion\":\"21.1.0.0.0\"}}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers?api-version=2023-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "b65bb99a-3e1b-4fc9-b3be-515e29c9c13f" ], + "CommandName": [ "Get-AzOracleDbServer" ], + "FullCommandName": [ "Get-AzOracleDbServer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "248" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/E96396CF5AA5BDD838437802B86516A7/D88B154356A760F5E12C97D0DFBA7965" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "bbf1cb46-bb6e-4732-825a-e3cc6c2e9331" ], + "x-ms-correlation-request-id": [ "55914564-32a6-4460-9171-6afe2beeaf5a" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3748" ], + "x-ms-routing-request-id": [ "UKWEST:20240704T140053Z:55914564-32a6-4460-9171-6afe2beeaf5a" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7E3D92247138443A9535D00F63531F84 Ref B: AMS231020512045 Ref C: 2024-07-04T14:00:51Z" ], + "Date": [ "Thu, 04 Jul 2024 14:00:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3659" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"name\":\"dbServer-2\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"displayName\":\"dbServer-2\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q\",\"cpuCoreCount\":0,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":0,\"vmClusterIds\":[],\"dbNodeIds\":[],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":0,\"shape\":null,\"timeCreated\":\"2024-07-04T13:20:13.889Z\",\"lifecycleDetails\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\",\"name\":\"dbServer-3\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\",\"displayName\":\"dbServer-3\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q\",\"cpuCoreCount\":0,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":0,\"vmClusterIds\":[],\"dbNodeIds\":[],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":0,\"shape\":null,\"timeCreated\":\"2024-07-04T13:20:13.890Z\",\"lifecycleDetails\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqazy4bp745fsrnje5pbp2ffdffmizmglwvytvymld4bcyq\",\"name\":\"dbServer-1\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqazy4bp745fsrnje5pbp2ffdffmizmglwvytvymld4bcyq\",\"displayName\":\"dbServer-1\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q\",\"cpuCoreCount\":0,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":0,\"vmClusterIds\":[],\"dbNodeIds\":[],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":0,\"shape\":null,\"timeCreated\":\"2024-07-04T13:20:13.888Z\",\"lifecycleDetails\":null}}]}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$PUT+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01+3": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01", + "Content": "{\n \"location\": \"eastus\",\n \"properties\": {\n \"dataStorageSizeInTbs\": 2,\n \"dbNodeStorageSizeInGbs\": 180,\n \"memorySizeInGbs\": 90,\n \"timeZone\": \"UTC\",\n \"hostname\": \"host\",\n \"cpuCoreCount\": 4,\n \"clusterName\": \"TestVMC\",\n \"dataStoragePercentage\": 80,\n \"cloudExadataInfrastructureId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\n \"sshPublicKeys\": [ \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure\" ],\n \"licenseModel\": \"LicenseIncluded\",\n \"vnetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\n \"giVersion\": \"19.0.0.0\",\n \"subnetId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\n \"displayName\": \"OFake_PowerShellTestVmCluster\",\n \"dbServers\": [ \"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\", \"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\" ]\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "1727" ] + } + }, + "Response": { + "StatusCode": 201, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"5e036aac-0000-0100-0000-6686ab1a0000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/BF40A60249EE93BA62938C053EE054A3/54B6FC64E4A36B1168CEB0B3D0C967B1" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo" ], + "x-ms-request-id": [ "a9fc691b-2996-4a38-bfbd-bc659b2ae5c1" ], + "x-ms-correlation-request-id": [ "a5c1cf57-257f-4cfe-aba7-e89e75caddf3" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140059Z:a5c1cf57-257f-4cfe-aba7-e89e75caddf3" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6FDFA1478FFD468B8074E2A367321572 Ref B: AMS231020512045 Ref C: 2024-07-04T14:00:53Z" ], + "Date": [ "Thu, 04 Jul 2024 14:00:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2728" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"name\":\"OFake_PowerShellTestVmCluster\",\"type\":\"oracle.database/cloudvmclusters\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T14:00:54.6190896Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T14:00:54.6190896Z\"},\"properties\":{\"ocid\":null,\"listenerPort\":null,\"nodeCount\":null,\"storageSizeInGbs\":null,\"dataStorageSizeInTbs\":2.0,\"dbNodeStorageSizeInGbs\":180,\"memorySizeInGbs\":90,\"timeCreated\":null,\"lifecycleDetails\":null,\"timeZone\":\"UTC\",\"zoneId\":null,\"hostname\":\"host\",\"domain\":null,\"cpuCoreCount\":4,\"ocpuCount\":null,\"clusterName\":\"TestVMC\",\"dataStoragePercentage\":80,\"isLocalBackupEnabled\":null,\"cloudExadataInfrastructureId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"isSparseDiskgroupEnabled\":null,\"systemVersion\":null,\"sshPublicKeys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure\"],\"licenseModel\":\"LicenseIncluded\",\"diskRedundancy\":null,\"scanIpIds\":null,\"vipIds\":null,\"scanDnsName\":null,\"scanListenerPortTcp\":null,\"scanListenerPortTcpSsl\":null,\"scanDnsRecordId\":null,\"shape\":null,\"provisioningState\":\"Accepted\",\"lifecycleState\":null,\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"giVersion\":\"19.0.0.0\",\"ociUrl\":null,\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"dataCollectionOptions\":null,\"displayName\":\"OFake_PowerShellTestVmCluster\",\"iormConfigCache\":null,\"lastUpdateHistoryEntryId\":null,\"dbServers\":[\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\"],\"compartmentId\":null,\"subnetOcid\":null,\"nsgCidrs\":null,\"nsgUrl\":null}}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900c371-0000-0100-0000-6686ab300000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "fd124342-8ec7-494d-8a20-6cebccf78306" ], + "x-ms-correlation-request-id": [ "b83ef67c-2a3c-4625-a90e-6702747a53b3" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140129Z:b83ef67c-2a3c-4625-a90e-6702747a53b3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 52C65799CA804795B9FB32E4CFA31494 Ref B: AMS231020512045 Ref C: 2024-07-04T14:01:29Z" ], + "Date": [ "Thu, 04 Jul 2024 14:01:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:01:19.708Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900c371-0000-0100-0000-6686ab300000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "004322ba-9b61-4d76-af5b-d2b478737d89" ], + "x-ms-correlation-request-id": [ "c2d23a04-24e5-4cf2-b279-a3045561af54" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140200Z:c2d23a04-24e5-4cf2-b279-a3045561af54" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0D8BC8534ADF4E9B9E5F609C3314074F Ref B: AMS231020512045 Ref C: 2024-07-04T14:01:59Z" ], + "Date": [ "Thu, 04 Jul 2024 14:02:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:01:19.708Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900c371-0000-0100-0000-6686ab300000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "248" ], + "x-ms-request-id": [ "54640307-5b0a-482f-9951-c4696f62e128" ], + "x-ms-correlation-request-id": [ "c5aa67f4-d074-4fd3-824f-788df46a4c5d" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3748" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140230Z:c5aa67f4-d074-4fd3-824f-788df46a4c5d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B4C74061B11C48DDB75F7A7A313B1BA4 Ref B: AMS231020512045 Ref C: 2024-07-04T14:02:30Z" ], + "Date": [ "Thu, 04 Jul 2024 14:02:30 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:01:19.708Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900c371-0000-0100-0000-6686ab300000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "4b9ebcd0-5d83-4f32-81b7-a10c204ec832" ], + "x-ms-correlation-request-id": [ "d57976ff-519e-4d6d-b911-6a952c509a00" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140301Z:d57976ff-519e-4d6d-b911-6a952c509a00" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8711A9937BAD4F4AA0CF4081998298ED Ref B: AMS231020512045 Ref C: 2024-07-04T14:03:01Z" ], + "Date": [ "Thu, 04 Jul 2024 14:03:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:01:19.708Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39007975-0000-0100-0000-6686abaf0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "5d3177f3-4201-49d2-873b-664398159a9d" ], + "x-ms-correlation-request-id": [ "bc6d03dd-5021-4a6d-af53-2bd86122b873" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140332Z:bc6d03dd-5021-4a6d-af53-2bd86122b873" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AAFB4683239840C0B40F0F7B2A44F3DA Ref B: AMS231020512045 Ref C: 2024-07-04T14:03:31Z" ], + "Date": [ "Thu, 04 Jul 2024 14:03:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:03:27.569Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39007975-0000-0100-0000-6686abaf0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "257d5ad8-1c7f-41e2-87e2-25fa1e6f2e45" ], + "x-ms-correlation-request-id": [ "9aaf1d07-267f-4dce-b2a0-5d714a0dcee4" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140402Z:9aaf1d07-267f-4dce-b2a0-5d714a0dcee4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 17A4AB3101614747B1D458AB72EF751C Ref B: AMS231020512045 Ref C: 2024-07-04T14:04:02Z" ], + "Date": [ "Thu, 04 Jul 2024 14:04:02 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:03:27.569Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+10": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39007975-0000-0100-0000-6686abaf0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "10ec120b-4f21-4760-bb39-1ac544a2c67d" ], + "x-ms-correlation-request-id": [ "c068b504-ae0e-4f65-9aad-3561d56a5329" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140433Z:c068b504-ae0e-4f65-9aad-3561d56a5329" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FD42D3E3E03546898AE17C77288DFF81 Ref B: AMS231020512045 Ref C: 2024-07-04T14:04:32Z" ], + "Date": [ "Thu, 04 Jul 2024 14:04:33 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:03:27.569Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+11": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39004178-0000-0100-0000-6686abf60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "1b186937-88f7-43ff-bba2-071e34d39ed0" ], + "x-ms-correlation-request-id": [ "010d2b01-e75a-4e25-b68e-f665bc5dde87" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140503Z:010d2b01-e75a-4e25-b68e-f665bc5dde87" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BC1681BD16D04B4BB8FF764D5218E391 Ref B: AMS231020512045 Ref C: 2024-07-04T14:05:03Z" ], + "Date": [ "Thu, 04 Jul 2024 14:05:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:04:38.176Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39004178-0000-0100-0000-6686abf60000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "62599498-832a-4fc1-a068-51bd957af41f" ], + "x-ms-correlation-request-id": [ "3b41c6a5-35ba-4805-bb3c-ad7b70b4f090" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140534Z:3b41c6a5-35ba-4805-bb3c-ad7b70b4f090" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: C9608CABD68B41819497A33FB906BDA7 Ref B: AMS231020512045 Ref C: 2024-07-04T14:05:34Z" ], + "Date": [ "Thu, 04 Jul 2024 14:05:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:04:38.176Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+13": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900787a-0000-0100-0000-6686ac3e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "e0bac39d-a424-40d5-aa0c-9490e570086a" ], + "x-ms-correlation-request-id": [ "57a28532-8388-44b7-989f-7eb832a3f929" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140604Z:57a28532-8388-44b7-989f-7eb832a3f929" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1DE9994B54A04E9AB582EF999A3C357E Ref B: AMS231020512045 Ref C: 2024-07-04T14:06:04Z" ], + "Date": [ "Thu, 04 Jul 2024 14:06:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:05:50.483Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+14": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900787a-0000-0100-0000-6686ac3e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "d8d8b544-b46c-475d-8deb-b636871bf400" ], + "x-ms-correlation-request-id": [ "d65a9c56-1730-49cb-9d40-74cc26b9f4a1" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140635Z:d65a9c56-1730-49cb-9d40-74cc26b9f4a1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B3BF2DB385ED493788D7462D1496E24D Ref B: AMS231020512045 Ref C: 2024-07-04T14:06:35Z" ], + "Date": [ "Thu, 04 Jul 2024 14:06:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:05:50.483Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+15": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900787a-0000-0100-0000-6686ac3e0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "bb8f7ac6-8c8f-4916-b26b-5d5bc5a9f112" ], + "x-ms-correlation-request-id": [ "6219865a-5983-4cfb-9380-9e1fbb73296f" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140706Z:6219865a-5983-4cfb-9380-9e1fbb73296f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FB562D10915C48F78762E3A788AC4D22 Ref B: AMS231020512045 Ref C: 2024-07-04T14:07:05Z" ], + "Date": [ "Thu, 04 Jul 2024 14:07:05 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:05:50.483Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+16": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900aa7c-0000-0100-0000-6686ac8d0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "f460240e-02fb-45bc-97d7-34c140943ac3" ], + "x-ms-correlation-request-id": [ "4e64118a-15c9-4b8d-bcce-6c120e3a62e6" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140736Z:4e64118a-15c9-4b8d-bcce-6c120e3a62e6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DF6C5F1618BC47C3ACB76FFAF5E4455A Ref B: AMS231020512045 Ref C: 2024-07-04T14:07:36Z" ], + "Date": [ "Thu, 04 Jul 2024 14:07:36 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:07:08.924Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+17": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900aa7c-0000-0100-0000-6686ac8d0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "2d4838d8-aa08-4adc-bb0c-918c9613d432" ], + "x-ms-correlation-request-id": [ "decbb2b3-143b-4204-b7a9-94404fb759c5" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140807Z:decbb2b3-143b-4204-b7a9-94404fb759c5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 926DEB2B9B6B4C0C90B3FFE652A3DFC2 Ref B: AMS231020512045 Ref C: 2024-07-04T14:08:06Z" ], + "Date": [ "Thu, 04 Jul 2024 14:08:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:07:08.924Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+18": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900a67e-0000-0100-0000-6686acd10000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "8e42bb1d-68a5-4f2b-bda5-a56f7e9cf4f4" ], + "x-ms-correlation-request-id": [ "da592714-0333-4131-99f0-fba2da2da4d4" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140837Z:da592714-0333-4131-99f0-fba2da2da4d4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6C16BC7AA0954B069CEF8F37C50195DD Ref B: AMS231020512045 Ref C: 2024-07-04T14:08:37Z" ], + "Date": [ "Thu, 04 Jul 2024 14:08:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:08:17.239Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+19": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"3900a67e-0000-0100-0000-6686acd10000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "b9ec78d6-646d-4ccd-a81f-8d53a330b8c6" ], + "x-ms-correlation-request-id": [ "37136e7a-92f0-4942-9bb1-aea34d807f49" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140908Z:37136e7a-92f0-4942-9bb1-aea34d807f49" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 978D75D8EB66433E9B8D67911A719832 Ref B: AMS231020512045 Ref C: 2024-07-04T14:09:08Z" ], + "Date": [ "Thu, 04 Jul 2024 14:09:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:08:17.239Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+20": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39009680-0000-0100-0000-6686ad130000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "cea90c95-6e0c-4dc1-8735-05cd4f3f300b" ], + "x-ms-correlation-request-id": [ "7d5ba9d5-e610-45f5-9dfe-63e580e55fff" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T140939Z:7d5ba9d5-e610-45f5-9dfe-63e580e55fff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4B10BBC7ED35452F81ED13D46CD34DF3 Ref B: AMS231020512045 Ref C: 2024-07-04T14:09:38Z" ], + "Date": [ "Thu, 04 Jul 2024 14:09:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:09:23.132Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+21": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39009680-0000-0100-0000-6686ad130000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "e04fbb20-2b51-4475-9df3-ca39937fd954" ], + "x-ms-correlation-request-id": [ "3b1e7b6e-b8de-4ad0-a86b-e1e14a17ed12" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141009Z:3b1e7b6e-b8de-4ad0-a86b-e1e14a17ed12" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1AFF08F8CFB545D2A9144ED69CFD9350 Ref B: AMS231020512045 Ref C: 2024-07-04T14:10:09Z" ], + "Date": [ "Thu, 04 Jul 2024 14:10:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:09:23.132Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+22": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39009680-0000-0100-0000-6686ad130000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "6bcbb604-bfb2-497c-b8e8-71a0c0d455f1" ], + "x-ms-correlation-request-id": [ "cb038fd1-1822-43be-b789-f29d104bb127" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141040Z:cb038fd1-1822-43be-b789-f29d104bb127" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 50B0222C04D748F0AFE4632ADEC9A564 Ref B: AMS231020512045 Ref C: 2024-07-04T14:10:39Z" ], + "Date": [ "Thu, 04 Jul 2024 14:10:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:09:23.132Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+23": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39009680-0000-0100-0000-6686ad130000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "f4a94add-a3e9-4d9e-8286-687415ff0e52" ], + "x-ms-correlation-request-id": [ "d33533f4-24be-4794-936d-c0c7f3e92d66" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141110Z:d33533f4-24be-4794-936d-c0c7f3e92d66" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 517CE684164B4991BEC570635F833141 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:10Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "632" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Provisioning\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:09:23.132Z\",\"percentComplete\":25.0}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo+24": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556984591040588\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=E3AYGSdd6z-mRvE1ryNvHUn435jZdafAjIYrX7E0zlsPuRU6iHVgP5sClGso2JUi9b-RfFeYnqBm9JTOHHZFIffu83JXaJD6tDK8qZKjoHL_UA1E6rlVuugvrVSAVRg8BdJ9KalVtgyNFROBbhF56BFFX5OlMtp0Q0syM_dEF1NnFKmCC6y0T04FRX01QqtARx0tYoS3L6SlFBKhIQUsDu-BuDS94nlwtN7al5_qrQtAY_xYWWVYA1PW9DTWbVlzDeqMZvc3n2aIpy5XdC3bZS-Iv2_LJxpGdQWmXNQFAmJQqvs8CyYSepC5vIjrOFzsUjBBOEwxZrl9io5Qdf9x1A\u0026h=gpxZzbSGQM2fffLzveqlhFVCHjfZ1N8n6p6Emw_JEbo", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"39008784-0000-0100-0000-6686ad990000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "0d573bbf-9689-4015-8b31-56db2cb60e82" ], + "x-ms-correlation-request-id": [ "71b6be5f-ca1d-462c-8e2b-277771aa2e7e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141141Z:71b6be5f-ca1d-462c-8e2b-277771aa2e7e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2392B7FD079540E2BC44891938958670 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:41Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "652" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"name\":\"a9fc691b-2996-4a38-bfbd-bc659b2ae5c1*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"status\":\"Succeeded\",\"startTime\":\"2024-07-04T14:00:58.7144062Z\",\"endTime\":\"2024-07-04T14:11:37.7808715Z\",\"percentComplete\":100.0,\"properties\":null}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+CreateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01+25": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "387743bb-1710-4a70-b3a7-b9dda3a0f17b" ], + "CommandName": [ "New-AzOracleCloudVMCluster" ], + "FullCommandName": [ "New-AzOracleCloudVMCluster_CreateExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"5e03c2e5-0000-0100-0000-6686ad9a0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "fc754a4c-48b0-441b-a8a1-51081406fd45" ], + "x-ms-correlation-request-id": [ "a5ca5e93-d40e-47d3-9bb9-f20945e3b8a5" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141142Z:a5ca5e93-d40e-47d3-9bb9-f20945e3b8a5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E73557A2FDAB43398EA1459770F6EE56 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:41Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3684" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"name\":\"OFake_PowerShellTestVmCluster\",\"type\":\"oracle.database/cloudvmclusters\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T14:00:54.6190896Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T14:11:38.6139281Z\"},\"properties\":{\"ocid\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"listenerPort\":1521,\"nodeCount\":2,\"storageSizeInGbs\":196608,\"dataStorageSizeInTbs\":2.0,\"dbNodeStorageSizeInGbs\":180,\"memorySizeInGbs\":90,\"timeCreated\":\"2024-07-04T14:08:16.587Z\",\"timeZone\":\"UTC\",\"zoneId\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaniopo7il2vnoupesxyyxj5wi5zweo7ahlsgotqbacy4t3q6astma\",\"hostname\":\"host-dcbj8\",\"domain\":\"ocidelegated.ocipstestvnet.oraclevcn.com\",\"cpuCoreCount\":4,\"ocpuCount\":4.0,\"clusterName\":\"TestVMC\",\"dataStoragePercentage\":80,\"isLocalBackupEnabled\":false,\"cloudExadataInfrastructureId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"isSparseDiskgroupEnabled\":false,\"sshPublicKeys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure\"],\"licenseModel\":\"LicenseIncluded\",\"diskRedundancy\":\"High\",\"scanIpIds\":[],\"scanDnsName\":\"host-dcbj8-scan.ocidelegated.ocipstestvnet.oraclevcn.com\",\"scanListenerPortTcp\":1521,\"scanListenerPortTcpSsl\":2484,\"shape\":\"Exadata.X9M\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"giVersion\":\"19.9.0.0.0\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"dataCollectionOptions\":{\"isDiagnosticsEventsEnabled\":false,\"isHealthMonitoringEnabled\":false,\"isIncidentLogsEnabled\":false},\"displayName\":\"OFake_PowerShellTestVmCluster\",\"dbServers\":[\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\"],\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetOcid\":\"ocid1.subnet.oc1.iad.aaaaaaaaqankaqdo6glh2d4adkvmgqp733nxm2pmsrlvj2l5tdonuolmdzfq\",\"nsgUrl\":\"https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqazn236vl4jm6csusimv6lnvqq75p37ftucxgl43ixttda/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaaxtcblzrhjxn5ztqvohlo56if2e4ym7zihihdd5crx452mhmpw44q?region=us-ashburn-1\"}}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+GetVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "53210e04-5729-4cfa-9376-bacd2856936a" ], + "CommandName": [ "Get-AzOracleCloudVMCluster" ], + "FullCommandName": [ "Get-AzOracleCloudVMCluster_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"5e03c2e5-0000-0100-0000-6686ad9a0000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "1dcedb2a-3d61-40a3-a3c1-ae57b5f4b323" ], + "x-ms-correlation-request-id": [ "5b295c9e-4971-494f-ab44-3b4bc10ab708" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141142Z:5b295c9e-4971-494f-ab44-3b4bc10ab708" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7021DE90FB204D72BADAED869FE01B60 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:42Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3684" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"name\":\"OFake_PowerShellTestVmCluster\",\"type\":\"oracle.database/cloudvmclusters\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T14:00:54.6190896Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T14:11:38.6139281Z\"},\"properties\":{\"ocid\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"listenerPort\":1521,\"nodeCount\":2,\"storageSizeInGbs\":196608,\"dataStorageSizeInTbs\":2.0,\"dbNodeStorageSizeInGbs\":180,\"memorySizeInGbs\":90,\"timeCreated\":\"2024-07-04T14:08:16.587Z\",\"timeZone\":\"UTC\",\"zoneId\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaniopo7il2vnoupesxyyxj5wi5zweo7ahlsgotqbacy4t3q6astma\",\"hostname\":\"host-dcbj8\",\"domain\":\"ocidelegated.ocipstestvnet.oraclevcn.com\",\"cpuCoreCount\":4,\"ocpuCount\":4.0,\"clusterName\":\"TestVMC\",\"dataStoragePercentage\":80,\"isLocalBackupEnabled\":false,\"cloudExadataInfrastructureId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"isSparseDiskgroupEnabled\":false,\"sshPublicKeys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure\"],\"licenseModel\":\"LicenseIncluded\",\"diskRedundancy\":\"High\",\"scanIpIds\":[],\"scanDnsName\":\"host-dcbj8-scan.ocidelegated.ocipstestvnet.oraclevcn.com\",\"scanListenerPortTcp\":1521,\"scanListenerPortTcpSsl\":2484,\"shape\":\"Exadata.X9M\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"giVersion\":\"19.9.0.0.0\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"dataCollectionOptions\":{\"isDiagnosticsEventsEnabled\":false,\"isHealthMonitoringEnabled\":false,\"isIncidentLogsEnabled\":false},\"displayName\":\"OFake_PowerShellTestVmCluster\",\"dbServers\":[\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\"],\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetOcid\":\"ocid1.subnet.oc1.iad.aaaaaaaaqankaqdo6glh2d4adkvmgqp733nxm2pmsrlvj2l5tdonuolmdzfq\",\"nsgUrl\":\"https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqazn236vl4jm6csusimv6lnvqq75p37ftucxgl43ixttda/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaaxtcblzrhjxn5ztqvohlo56if2e4ym7zihihdd5crx452mhmpw44q?region=us-ashburn-1\"}}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+ListVmClusters+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/cloudVmClusters?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/cloudVmClusters?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "dd75a403-6c94-4ae4-a0bd-406ad3d5a19e" ], + "CommandName": [ "Get-AzOracleCloudVMCluster" ], + "FullCommandName": [ "Get-AzOracleCloudVMCluster_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "8340fdfe-d08a-4787-9b4a-3b330ec985b9" ], + "x-ms-correlation-request-id": [ "f9841e55-6cff-4d0d-ad5a-0e57506a1a3e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141143Z:f9841e55-6cff-4d0d-ad5a-0e57506a1a3e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BC09398643974D9585132E23034A8D19 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:42Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7181" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/cloudVmClusters/OFakeCluster-tags-test\",\"name\":\"OFakeCluster-tags-test\",\"type\":\"oracle.database/cloudvmclusters\",\"location\":\"eastus\",\"tags\":{\"provisioning\":\"tag\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T03:58:20.4603374Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T14:03:13.6201417Z\"},\"properties\":{\"ocid\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljtnirvylqab6pon4aipejidsh5sbse3za5zbshysco3qrku4rdejqa\",\"listenerPort\":1521,\"nodeCount\":2,\"storageSizeInGbs\":196608,\"dataStorageSizeInTbs\":2.0,\"dbNodeStorageSizeInGbs\":120,\"memorySizeInGbs\":60,\"timeCreated\":\"2024-07-04T04:10:48.88Z\",\"timeZone\":\"UTC\",\"zoneId\":\"ocid1.dns-zone.oc1.iad.aaaaaaaazuiq2jepw622jmc4dmbhcbzispdwzgg2gkzg2emi7cko2x7cuahq\",\"hostname\":\"dbqa-xxeem\",\"domain\":\"ocidelegated.ocidbqavcn1.oraclevcn.com\",\"cpuCoreCount\":4,\"ocpuCount\":4.0,\"dataStoragePercentage\":80,\"isLocalBackupEnabled\":false,\"cloudExadataInfrastructureId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Oracle.Database/cloudExadataInfrastructures/OFake-tags-test\",\"isSparseDiskgroupEnabled\":false,\"sshPublicKeys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCwzz039RwAK82JqoVnyemEInr3RultXHps09ngPWhTA46riQqhooaUc86rw+6CSs8E4ULa8TSGRifDOrzzori8Jw0ECcoxN32oqdYPr3lDfFdmdyYi1t7FhzVu1Y06ZfPh8opstcVpRdKnlJnHYEZfUytCaUxQ1dMeyeV09ofJRru7Y9AZO+FiDT2hS50t2Hu7WgkUMEEzpx9gse7zVJDC5ihBo111XXXf4Ffplm08PDXqc11MJlqTUdfNrzAaOtmBk7gJyHtndR0gW+eawBKD56pGwzQ1tKczBJVwPZ2d4jbirrhACcUxyum5UKFCmnxJYjbkB/urlF3rKXQ13fJ ssh-key-2023-03-30\"],\"licenseModel\":\"LicenseIncluded\",\"diskRedundancy\":\"High\",\"scanIpIds\":[],\"scanDnsName\":\"dbqa-xxeem-scan.ocidelegated.ocidbqavcn1.oraclevcn.com\",\"scanListenerPortTcp\":1521,\"scanListenerPortTcpSsl\":2484,\"shape\":\"Exadata.X9M\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dbqa-vcn1\",\"giVersion\":\"23.0.0.0\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljtnirvylqab6pon4aipejidsh5sbse3za5zbshysco3qrku4rdejqa?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dbqa-resource-group/providers/Microsoft.Network/virtualNetworks/dbqa-vcn1/subnets/delegated\",\"dataCollectionOptions\":{\"isDiagnosticsEventsEnabled\":true,\"isHealthMonitoringEnabled\":true,\"isIncidentLogsEnabled\":true},\"displayName\":\"OFakeCluster-tags-test\",\"dbServers\":[\"ocid1.dbserver.oc1.iad.anuwcljtowjpydqa5w6jw6lpghodyqiexkgkhn25n5yuxonmgdxf34w7kn7q\",\"ocid1.dbserver.oc1.iad.anuwcljtowjpydqaoi2xkkktnuovjoka7qvf2vrliwurio5oug3xoq2smhwq\"],\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetOcid\":\"ocid1.subnet.oc1.iad.aaaaaaaairfjfcxyblztdi3tongiba3f4itxpckdq5noznl234rdyu2dncha\",\"nsgUrl\":\"https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqavhoizrm754tjn33y2ngo5c4lkrmp35tmvqpgffg7krmq/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaa7dyglqnetx7pvg6x5fl2qeft7lcb7utphzna6k6owv333l56vcta?region=us-ashburn-1\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"name\":\"OFake_PowerShellTestVmCluster\",\"type\":\"oracle.database/cloudvmclusters\",\"location\":\"eastus\",\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T14:00:54.6190896Z\",\"lastModifiedBy\":\"857ad006-4380-4712-ba4c-22f7c64d84e7\",\"lastModifiedByType\":\"Application\",\"lastModifiedAt\":\"2024-07-04T14:11:38.6139281Z\"},\"properties\":{\"ocid\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"listenerPort\":1521,\"nodeCount\":2,\"storageSizeInGbs\":196608,\"dataStorageSizeInTbs\":2.0,\"dbNodeStorageSizeInGbs\":180,\"memorySizeInGbs\":90,\"timeCreated\":\"2024-07-04T14:08:16.587Z\",\"timeZone\":\"UTC\",\"zoneId\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaniopo7il2vnoupesxyyxj5wi5zweo7ahlsgotqbacy4t3q6astma\",\"hostname\":\"host-dcbj8\",\"domain\":\"ocidelegated.ocipstestvnet.oraclevcn.com\",\"cpuCoreCount\":4,\"ocpuCount\":4.0,\"clusterName\":\"TestVMC\",\"dataStoragePercentage\":80,\"isLocalBackupEnabled\":false,\"cloudExadataInfrastructureId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"isSparseDiskgroupEnabled\":false,\"sshPublicKeys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure\"],\"licenseModel\":\"LicenseIncluded\",\"diskRedundancy\":\"High\",\"scanIpIds\":[],\"scanDnsName\":\"host-dcbj8-scan.ocidelegated.ocipstestvnet.oraclevcn.com\",\"scanListenerPortTcp\":1521,\"scanListenerPortTcpSsl\":2484,\"shape\":\"Exadata.X9M\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"giVersion\":\"19.9.0.0.0\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"dataCollectionOptions\":{\"isDiagnosticsEventsEnabled\":false,\"isHealthMonitoringEnabled\":false,\"isIncidentLogsEnabled\":false},\"displayName\":\"OFake_PowerShellTestVmCluster\",\"dbServers\":[\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\"],\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetOcid\":\"ocid1.subnet.oc1.iad.aaaaaaaaqankaqdo6glh2d4adkvmgqp733nxm2pmsrlvj2l5tdonuolmdzfq\",\"nsgUrl\":\"https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqazn236vl4jm6csusimv6lnvqq75p37ftucxgl43ixttda/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaaxtcblzrhjxn5ztqvohlo56if2e4ym7zihihdd5crx452mhmpw44q?region=us-ashburn-1\"}}]}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+UpdateVmCluster+$PATCH+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01+1": { + "Request": { + "Method": "PATCH", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01", + "Content": "{\n \"tags\": {\n \"tagName\": \"tagValue\"\n }\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "45" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"5e035de6-0000-0100-0000-6686ada10000\"" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/C1FE3441CFA3259B8AE0A9862EE046A3/827FDD6D0C929A66FDA93B298CEB52DD" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "67e93dc9-b931-4449-b6c2-e13af7b6de10" ], + "x-ms-correlation-request-id": [ "0dc3823a-91f1-422e-9ad2-96154365234a" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141145Z:0dc3823a-91f1-422e-9ad2-96154365234a" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 589F5DAC65FA48B0BABD045E1EE8D57D Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:43Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3696" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"name\":\"OFake_PowerShellTestVmCluster\",\"type\":\"oracle.database/cloudvmclusters\",\"location\":\"eastus\",\"tags\":{\"tagName\":\"tagValue\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T14:00:54.6190896Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T14:11:44.3265055Z\"},\"properties\":{\"ocid\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"listenerPort\":1521,\"nodeCount\":2,\"storageSizeInGbs\":196608,\"dataStorageSizeInTbs\":2.0,\"dbNodeStorageSizeInGbs\":180,\"memorySizeInGbs\":90,\"timeCreated\":\"2024-07-04T14:08:16.587Z\",\"timeZone\":\"UTC\",\"zoneId\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaniopo7il2vnoupesxyyxj5wi5zweo7ahlsgotqbacy4t3q6astma\",\"hostname\":\"host-dcbj8\",\"domain\":\"ocidelegated.ocipstestvnet.oraclevcn.com\",\"cpuCoreCount\":4,\"ocpuCount\":4.0,\"clusterName\":\"TestVMC\",\"dataStoragePercentage\":80,\"isLocalBackupEnabled\":false,\"cloudExadataInfrastructureId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"isSparseDiskgroupEnabled\":false,\"sshPublicKeys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure\"],\"licenseModel\":\"LicenseIncluded\",\"diskRedundancy\":\"High\",\"scanIpIds\":[],\"scanDnsName\":\"host-dcbj8-scan.ocidelegated.ocipstestvnet.oraclevcn.com\",\"scanListenerPortTcp\":1521,\"scanListenerPortTcpSsl\":2484,\"shape\":\"Exadata.X9M\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"giVersion\":\"19.9.0.0.0\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"dataCollectionOptions\":{\"isDiagnosticsEventsEnabled\":false,\"isHealthMonitoringEnabled\":false,\"isIncidentLogsEnabled\":false},\"displayName\":\"OFake_PowerShellTestVmCluster\",\"dbServers\":[\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\"],\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetOcid\":\"ocid1.subnet.oc1.iad.aaaaaaaaqankaqdo6glh2d4adkvmgqp733nxm2pmsrlvj2l5tdonuolmdzfq\",\"nsgUrl\":\"https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqazn236vl4jm6csusimv6lnvqq75p37ftucxgl43ixttda/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaaxtcblzrhjxn5ztqvohlo56if2e4ym7zihihdd5crx452mhmpw44q?region=us-ashburn-1\"}}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+UpdateVmCluster+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "593881d2-fd5e-4bf2-9b59-adef53572d57" ], + "CommandName": [ "Get-AzOracleCloudVMCluster" ], + "FullCommandName": [ "Get-AzOracleCloudVMCluster_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"5e035de6-0000-0100-0000-6686ada10000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "x-ms-request-id": [ "70a70aa4-41e0-41fb-b165-c59523368b63" ], + "x-ms-correlation-request-id": [ "a54ecf2b-f36a-42f7-b4a5-a06031c07cd7" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141146Z:a54ecf2b-f36a-42f7-b4a5-a06031c07cd7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 20065A5BE0104203A9F1D1334BA958E1 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:46Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3696" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"name\":\"OFake_PowerShellTestVmCluster\",\"type\":\"oracle.database/cloudvmclusters\",\"location\":\"eastus\",\"tags\":{\"tagName\":\"tagValue\"},\"systemData\":{\"createdBy\":\"example@oracle.com\",\"createdByType\":\"User\",\"createdAt\":\"2024-07-04T14:00:54.6190896Z\",\"lastModifiedBy\":\"example@oracle.com\",\"lastModifiedByType\":\"User\",\"lastModifiedAt\":\"2024-07-04T14:11:44.3265055Z\"},\"properties\":{\"ocid\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"listenerPort\":1521,\"nodeCount\":2,\"storageSizeInGbs\":196608,\"dataStorageSizeInTbs\":2.0,\"dbNodeStorageSizeInGbs\":180,\"memorySizeInGbs\":90,\"timeCreated\":\"2024-07-04T14:08:16.587Z\",\"timeZone\":\"UTC\",\"zoneId\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaniopo7il2vnoupesxyyxj5wi5zweo7ahlsgotqbacy4t3q6astma\",\"hostname\":\"host-dcbj8\",\"domain\":\"ocidelegated.ocipstestvnet.oraclevcn.com\",\"cpuCoreCount\":4,\"ocpuCount\":4.0,\"clusterName\":\"TestVMC\",\"dataStoragePercentage\":80,\"isLocalBackupEnabled\":false,\"cloudExadataInfrastructureId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra\",\"isSparseDiskgroupEnabled\":false,\"sshPublicKeys\":[\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure\"],\"licenseModel\":\"LicenseIncluded\",\"diskRedundancy\":\"High\",\"scanIpIds\":[],\"scanDnsName\":\"host-dcbj8-scan.ocidelegated.ocipstestvnet.oraclevcn.com\",\"scanListenerPortTcp\":1521,\"scanListenerPortTcpSsl\":2484,\"shape\":\"Exadata.X9M\",\"provisioningState\":\"Succeeded\",\"lifecycleState\":\"Available\",\"vnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet\",\"giVersion\":\"19.9.0.0.0\",\"ociUrl\":\"https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a?region=us-ashburn-1\u0026tenant=orpsandbox3\u0026compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated\",\"dataCollectionOptions\":{\"isDiagnosticsEventsEnabled\":false,\"isHealthMonitoringEnabled\":false,\"isIncidentLogsEnabled\":false},\"displayName\":\"OFake_PowerShellTestVmCluster\",\"dbServers\":[\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\"],\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"subnetOcid\":\"ocid1.subnet.oc1.iad.aaaaaaaaqankaqdo6glh2d4adkvmgqp733nxm2pmsrlvj2l5tdonuolmdzfq\",\"nsgUrl\":\"https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqazn236vl4jm6csusimv6lnvqq75p37ftucxgl43ixttda/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaaxtcblzrhjxn5ztqvohlo56if2e4ym7zihihdd5crx452mhmpw44q?region=us-ashburn-1\"}}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+StopVm+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "ccf238b9-bfd9-4f6a-ad88-a972bcc2d72c" ], + "CommandName": [ "Get-AzOracleDbNode" ], + "FullCommandName": [ "Get-AzOracleDbNode_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/399644055F529E1E2F2EF57D60E9F5B3/6C8D9EBFE6EAA4063E6CF0C608720D54" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "96bdf789-9146-41e5-941b-628c457dd036" ], + "x-ms-correlation-request-id": [ "e32b72f9-47fc-4698-892c-9c2775ade31c" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141148Z:e32b72f9-47fc-4698-892c-9c2775ade31c" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6A43CE2DD89245F08FDBE366D0270729 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:46Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2485" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"name\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"type\":\"Oracle.Database/cloudVmClusters/dbNodes\",\"properties\":{\"ocid\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"additionalDetails\":null,\"backupIpId\":\"ocid1.privateIp.fake.2.0\",\"backupVnic2Id\":\"ocid1.vnic.fake.2.0\",\"backupVnicId\":null,\"cpuCoreCount\":2,\"dbNodeStorageSizeInGbs\":90,\"dbServerId\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"dbSystemId\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"faultDomain\":null,\"hostIpId\":\"ocid1.privateIp.fake.1.0\",\"hostname\":\"host-dcbj81\",\"provisioningState\":\"Available\",\"lifecycleState\":null,\"maintenanceType\":null,\"memorySizeInGbs\":45,\"softwareStorageSizeInGb\":null,\"timeCreated\":\"2024-07-04T14:08:16.591Z\",\"timeMaintenanceWindowEnd\":null,\"timeMaintenanceWindowStart\":null,\"vnic2Id\":\"ocid1.vnic.fake.1.0\",\"vnicId\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqao2izyn6vpiwralhao23cchsned4um7nqp3jxtnuzypsq\",\"name\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqao2izyn6vpiwralhao23cchsned4um7nqp3jxtnuzypsq\",\"type\":\"Oracle.Database/cloudVmClusters/dbNodes\",\"properties\":{\"ocid\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqao2izyn6vpiwralhao23cchsned4um7nqp3jxtnuzypsq\",\"additionalDetails\":null,\"backupIpId\":\"ocid1.privateIp.fake.2.1\",\"backupVnic2Id\":\"ocid1.vnic.fake.2.1\",\"backupVnicId\":null,\"cpuCoreCount\":2,\"dbNodeStorageSizeInGbs\":90,\"dbServerId\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\",\"dbSystemId\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"faultDomain\":null,\"hostIpId\":\"ocid1.privateIp.fake.1.1\",\"hostname\":\"host-dcbj82\",\"provisioningState\":\"Available\",\"lifecycleState\":null,\"maintenanceType\":null,\"memorySizeInGbs\":45,\"softwareStorageSizeInGb\":null,\"timeCreated\":\"2024-07-04T14:08:16.592Z\",\"timeMaintenanceWindowEnd\":null,\"timeMaintenanceWindowStart\":null,\"vnic2Id\":\"ocid1.vnic.fake.1.1\",\"vnicId\":null}}]}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+StopVm+$POST+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka/action?api-version=2023-09-01+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka/action?api-version=2023-09-01", + "Content": "{\n \"action\": \"Stop\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "22" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/7C461B5D37B6DEB53F4B6DCC77E31B2C/783BED0F17FD86EEE5432FE054F3BFBE" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "501e0ba8-0460-478b-9695-4c5919a32bc1" ], + "x-ms-correlation-request-id": [ "36e0e003-e3da-429f-8722-7804c385ab01" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141150Z:36e0e003-e3da-429f-8722-7804c385ab01" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 430831C143144907BBD5A4E228460296 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:48Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1253" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"ocid\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"additionalDetails\":null,\"backupIpId\":\"ocid1.privateIp.fake.2.0\",\"backupVnic2Id\":\"ocid1.vnic.fake.2.0\",\"backupVnicId\":null,\"cpuCoreCount\":2,\"dbNodeStorageSizeInGbs\":90,\"dbServerId\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"dbSystemId\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"faultDomain\":null,\"hostIpId\":\"ocid1.privateIp.fake.1.0\",\"hostname\":\"host-dcbj81\",\"provisioningState\":\"Stopping\",\"lifecycleState\":null,\"maintenanceType\":null,\"memorySizeInGbs\":45,\"softwareStorageSizeInGb\":null,\"timeCreated\":\"2024-07-04T14:08:16.591Z\",\"timeMaintenanceWindowEnd\":null,\"timeMaintenanceWindowStart\":null,\"vnic2Id\":\"ocid1.vnic.fake.1.0\",\"vnicId\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"type\":\"Oracle.Database/cloudVmClusters/dbNodes\",\"name\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"systemData\":null}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+StartVm+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "32" ], + "x-ms-client-request-id": [ "b8e45cd9-0233-4799-b35d-23a312c7c543" ], + "CommandName": [ "Get-AzOracleDbNode" ], + "FullCommandName": [ "Get-AzOracleDbNode_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/ED712BCD9BB2FC75830984BE54A0DBBF/382516544A2788AA20C382A996142AE4" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "08689294-7b44-4fdc-a9a8-d1c49fede05f" ], + "x-ms-correlation-request-id": [ "c327e6a3-c1a8-4915-8c9c-02b12738b983" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141152Z:c327e6a3-c1a8-4915-8c9c-02b12738b983" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1A2E22CE26834B478F504FE6ADD1CE05 Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:51Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2484" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"name\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"type\":\"Oracle.Database/cloudVmClusters/dbNodes\",\"properties\":{\"ocid\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"additionalDetails\":null,\"backupIpId\":\"ocid1.privateIp.fake.2.0\",\"backupVnic2Id\":\"ocid1.vnic.fake.2.0\",\"backupVnicId\":null,\"cpuCoreCount\":2,\"dbNodeStorageSizeInGbs\":90,\"dbServerId\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"dbSystemId\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"faultDomain\":null,\"hostIpId\":\"ocid1.privateIp.fake.1.0\",\"hostname\":\"host-dcbj81\",\"provisioningState\":\"Stopping\",\"lifecycleState\":null,\"maintenanceType\":null,\"memorySizeInGbs\":45,\"softwareStorageSizeInGb\":null,\"timeCreated\":\"2024-07-04T14:08:16.591Z\",\"timeMaintenanceWindowEnd\":null,\"timeMaintenanceWindowStart\":null,\"vnic2Id\":\"ocid1.vnic.fake.1.0\",\"vnicId\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqao2izyn6vpiwralhao23cchsned4um7nqp3jxtnuzypsq\",\"name\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqao2izyn6vpiwralhao23cchsned4um7nqp3jxtnuzypsq\",\"type\":\"Oracle.Database/cloudVmClusters/dbNodes\",\"properties\":{\"ocid\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqao2izyn6vpiwralhao23cchsned4um7nqp3jxtnuzypsq\",\"additionalDetails\":null,\"backupIpId\":\"ocid1.privateIp.fake.2.1\",\"backupVnic2Id\":\"ocid1.vnic.fake.2.1\",\"backupVnicId\":null,\"cpuCoreCount\":2,\"dbNodeStorageSizeInGbs\":90,\"dbServerId\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq\",\"dbSystemId\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"faultDomain\":null,\"hostIpId\":\"ocid1.privateIp.fake.1.1\",\"hostname\":\"host-dcbj82\",\"provisioningState\":\"Available\",\"lifecycleState\":null,\"maintenanceType\":null,\"memorySizeInGbs\":45,\"softwareStorageSizeInGb\":null,\"timeCreated\":\"2024-07-04T14:08:16.592Z\",\"timeMaintenanceWindowEnd\":null,\"timeMaintenanceWindowStart\":null,\"vnic2Id\":\"ocid1.vnic.fake.1.1\",\"vnicId\":null}}]}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+StartVm+$POST+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka/action?api-version=2023-09-01+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka/action?api-version=2023-09-01", + "Content": "{\n \"action\": \"Start\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "23" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/D637B250487B78DF236272010F88DE5C/DFBAA0F2AF1E1A20B60BB94D95AF5151" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "db659dcf-c029-456c-88a8-84c82657b601" ], + "x-ms-correlation-request-id": [ "d8e4a923-a37f-4762-9d5e-39845915b8bb" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141154Z:d8e4a923-a37f-4762-9d5e-39845915b8bb" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1A69B8B2FA004442B6DAAC4BA2B28EEB Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:52Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1253" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"ocid\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"additionalDetails\":null,\"backupIpId\":\"ocid1.privateIp.fake.2.0\",\"backupVnic2Id\":\"ocid1.vnic.fake.2.0\",\"backupVnicId\":null,\"cpuCoreCount\":2,\"dbNodeStorageSizeInGbs\":90,\"dbServerId\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq\",\"dbSystemId\":\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqalhnrauwwl3ubqj74t5prlloptxpouhbsalzjtmmthl7a\",\"faultDomain\":null,\"hostIpId\":\"ocid1.privateIp.fake.1.0\",\"hostname\":\"host-dcbj81\",\"provisioningState\":\"Starting\",\"lifecycleState\":null,\"maintenanceType\":null,\"memorySizeInGbs\":45,\"softwareStorageSizeInGb\":null,\"timeCreated\":\"2024-07-04T14:08:16.591Z\",\"timeMaintenanceWindowEnd\":null,\"timeMaintenanceWindowStart\":null,\"vnic2Id\":\"ocid1.vnic.fake.1.0\",\"vnicId\":null},\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"type\":\"Oracle.Database/cloudVmClusters/dbNodes\",\"name\":\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqabzztdkmoe5n2si7oqzvmooxdrjz32zxdwxinu5atszka\",\"systemData\":null}", + "isContentBase64": false + } + }, + "AzVmCluster+[NoContext]+DeleteVmCluster+$DELETE+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01+1": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "34" ], + "x-ms-client-request-id": [ "f22174e6-1219-479b-8d2d-77326ea96f7e" ], + "CommandName": [ "Remove-AzOracleCloudVMCluster" ], + "FullCommandName": [ "Remove-AzOracleCloudVMCluster_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"5e032ce7-0000-0100-0000-6686adab0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/1ca593a5-41c9-426e-b5d5-042d55a8adc0*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556991157267005\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=NAWCBlbqfoeYZbLcG9h1bVcOkoECtP72US_TpBp2AVnyurMCg1HmGmPb9m_z_WsSCsmIm4HVuHBYIJ66cN6_HEQ0BI74Tbz3tz26FT3xt5x1TtT12xVxLLvVhrUUsozvSMPh1Xuo99pITkXWdgzqSC1Qdn319qAAvoZBAukbUStLypmpW79cbSfsjHuboCMcCpLCzv9gaQa7AmW7QmnpULaLFy2XNjQJiZtIksmWnbGXMwZX85kB2syNeN_q-Rfwoi9M6k68nGwbKvJ-5uB1oaeTu21-8wESs8LyPJoIwHRmcF92PwfFZ6NPgDCUUFQsedzQk8e0ZRZziRDYQh_U4w\u0026h=hslj_P2moQSRKYwBBWscRE2diyIcza6QnLcOh4X2n2E" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/3B883DC694106C37315C6BECF55D3B79/768D4CDC2D1AC3EB652931FD4F83C3EB" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/1ca593a5-41c9-426e-b5d5-042d55a8adc0*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638556991157267005\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=NAWCBlbqfoeYZbLcG9h1bVcOkoECtP72US_TpBp2AVnyurMCg1HmGmPb9m_z_WsSCsmIm4HVuHBYIJ66cN6_HEQ0BI74Tbz3tz26FT3xt5x1TtT12xVxLLvVhrUUsozvSMPh1Xuo99pITkXWdgzqSC1Qdn319qAAvoZBAukbUStLypmpW79cbSfsjHuboCMcCpLCzv9gaQa7AmW7QmnpULaLFy2XNjQJiZtIksmWnbGXMwZX85kB2syNeN_q-Rfwoi9M6k68nGwbKvJ-5uB1oaeTu21-8wESs8LyPJoIwHRmcF92PwfFZ6NPgDCUUFQsedzQk8e0ZRZziRDYQh_U4w\u0026h=hslj_P2moQSRKYwBBWscRE2diyIcza6QnLcOh4X2n2E" ], + "x-ms-request-id": [ "1ca593a5-41c9-426e-b5d5-042d55a8adc0" ], + "x-ms-correlation-request-id": [ "8b9295dd-ebee-4e2a-a649-be4ed38ffb87" ], + "x-ms-ratelimit-remaining-subscription-global-deletes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240704T141155Z:8b9295dd-ebee-4e2a-a649-be4ed38ffb87" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 8DE8781E6C7C4FD68EC5271DC7F34A0B Ref B: AMS231020512045 Ref C: 2024-07-04T14:11:54Z" ], + "Date": [ "Thu, 04 Jul 2024 14:11:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "bnVsbA==", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/AzVmCluster.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/AzVmCluster.Tests.ps1 new file mode 100644 index 000000000000..5bcffc0220fd --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/AzVmCluster.Tests.ps1 @@ -0,0 +1,81 @@ +if(($null -eq $TestName) -or ($TestName -contains 'AzVmCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'AzVmCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'AzVmCluster' { + It 'CreateVmCluster' { + { + $sshPublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDMN6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwVKPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure" + + $exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $env.exaInfraName -ResourceGroupName $env.resourceGroup + $exaInfraId = $exaInfra.Id + + # Get Db Server Ocids + $dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $env.exaInfraName -ResourceGroupName $env.resourceGroup + $dbServerOcid1 = $dbServerList[0].Ocid + $dbServerOcid2 = $dbServerList[1].Ocid + + $vmCluster = New-AzOracleCloudVMCluster -Name $env.vmClusterName -ResourceGroupName $env.resourceGroup -Location $env.location -DisplayName $env.vmClusterName -HostName $env.vmClusterHostName -CpuCoreCount $env.vmClusterCpuCoreCount -CloudExadataInfrastructureId $exaInfraId -SshPublicKey $sshPublicKey -VnetId $env.vnetId -GiVersion $env.vmClusterGiVersion -SubnetId $env.subnetId -LicenseModel $env.vmClusterLicenseModel -ClusterName $env.vmClusterClusterName -MemorySizeInGb $env.vmClusterMemorySizeInGb -DbNodeStorageSizeInGb $env.vmClusterDbNodeStorageSizeInGb -DataStorageSizeInTb $env.vmClusterDataStorageSizeInTb -DataStoragePercentage $env.vmClusterDataStoragePercentage -TimeZone $env.vmClusterTimeZone -DbServer @($dbServerOcid1, $dbServerOcid2) + $vmCluster.Name | Should -Be $env.vmClusterName + } | Should -Not -Throw + } + It 'GetVmCluster' { + { + $vmCluster = Get-AzOracleCloudVMCluster -Name $env.vmClusterName -ResourceGroupName $env.resourceGroup + $vmCluster.Name | Should -Be $env.vmClusterName + } | Should -Not -Throw + } + It 'ListVmClusters' { + { + $vmClusterList = Get-AzOracleCloudVMCluster + $vmClusterList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } + It 'UpdateVmCluster' { + { + $tagHashTable = @{'tagName'="tagValue"} + Update-AzOracleCloudVMCluster -Name $env.vmClusterName -ResourceGroupName $env.resourceGroup -Tag $tagHashTable + $exaInfra = Get-AzOracleCloudVMCluster -Name $env.vmClusterName -ResourceGroupName $env.resourceGroup + $exaInfra.Tag.Get_Item("tagName") | Should -Be "tagValue" + } | Should -Not -Throw + } + It 'StopVm' { + { + $stopActionName = "Stop" + + # Get Db Node Ocids + $dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $env.vmClusterName -ResourceGroupName $env.resourceGroup + $dbNodeOcid1 = $dbNodeList[0].Name + + Invoke-AzOracleActionDbNode -Cloudvmclustername $env.vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $env.resourceGroup -Action $stopActionName + } | Should -Not -Throw + } + It 'StartVm' { + { + $startActionName = "Start" + + # Get Db Node Ocids + $dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $env.vmClusterName -ResourceGroupName $env.resourceGroup + $dbNodeOcid1 = $dbNodeList[0].Name + + Invoke-AzOracleActionDbNode -Cloudvmclustername $env.vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $env.resourceGroup -Action $startActionName + } | Should -Not -Throw + } + It 'DeleteVmCluster' { + { + Remove-AzOracleCloudVMCluster -NoWait -Name $env.vmClusterName -ResourceGroupName $env.resourceGroup + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabase.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..741eddab14ee --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabase.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleAutonomousDatabase' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseBackup.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..b3b9386d4ec2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseBackup.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleAutonomousDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleAutonomousDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleAutonomousDatabaseBackup' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityAutonomousDatabase' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Recording.json b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Recording.json new file mode 100644 index 000000000000..95b7c456428f --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzOracleAutonomousDatabaseCharacterSet+[NoContext]+List+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "61867923-96b5-4b62-b634-a61d03b1c264" ], + "CommandName": [ "Get-AzOracleAutonomousDatabaseCharacterSet" ], + "FullCommandName": [ "Get-AzOracleAutonomousDatabaseCharacterSet_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/953CF648E9692641A50950F63E8B98AC/344D800859DAB03E7553FC8627A4CD0F" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "3135341c-2078-45d8-94da-68fe2d3e6037" ], + "x-ms-correlation-request-id": [ "27e87f36-2954-420b-9b7e-c1ee4c3ccd53" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240705T102343Z:27e87f36-2954-420b-9b7e-c1ee4c3ccd53" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: AB55EAF3F0C24E89857823CF42DE2478 Ref B: AMS231032607027 Ref C: 2024-07-05T10:23:41Z" ], + "Date": [ "Fri, 05 Jul 2024 10:23:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "22493" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/al32utf8\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AL32UTF8\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8ados710\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8ADOS710\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8ados720\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8ADOS720\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8aptec715\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8APTEC715\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8arabicmacs\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8ARABICMACS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8asmo8x\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8ASMO8X\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8iso8859p6\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8ISO8859P6\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8mswin1256\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8MSWIN1256\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8mussad768\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8MUSSAD768\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8nafitha711\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8NAFITHA711\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8nafitha721\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8NAFITHA721\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8sakhr706\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8SAKHR706\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ar8sakhr707\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AR8SAKHR707\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/az8iso8859p9e\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"AZ8ISO8859P9E\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/bg8mswin\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"BG8MSWIN\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/bg8pc437s\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"BG8PC437S\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/blt8cp921\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"BLT8CP921\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/blt8iso8859p13\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"BLT8ISO8859P13\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/blt8mswin1257\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"BLT8MSWIN1257\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/blt8pc775\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"BLT8PC775\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/bn8bscii\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"BN8BSCII\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cdn8pc863\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CDN8PC863\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cel8iso8859p14\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CEL8ISO8859P14\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cl8iso8859p5\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CL8ISO8859P5\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cl8isoir111\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CL8ISOIR111\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cl8koi8r\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CL8KOI8R\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cl8koi8u\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CL8KOI8U\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cl8maccyrillics\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CL8MACCYRILLICS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/cl8mswin1251\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"CL8MSWIN1251\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ee8iso8859p2\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EE8ISO8859P2\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ee8macces\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EE8MACCES\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ee8maccroatians\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EE8MACCROATIANS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ee8mswin1250\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EE8MSWIN1250\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ee8pc852\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EE8PC852\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/el8dec\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EL8DEC\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/el8iso8859p7\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EL8ISO8859P7\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/el8macgreeks\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EL8MACGREEKS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/el8mswin1253\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EL8MSWIN1253\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/el8pc437s\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EL8PC437S\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/el8pc851\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EL8PC851\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/el8pc869\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"EL8PC869\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/et8mswin923\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ET8MSWIN923\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/hu8abmod\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"HU8ABMOD\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/hu8cwi2\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"HU8CWI2\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/in8iscii\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"IN8ISCII\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/is8pc861\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"IS8PC861\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/iw8iso8859p8\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"IW8ISO8859P8\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/iw8machebrews\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"IW8MACHEBREWS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/iw8mswin1255\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"IW8MSWIN1255\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/iw8pc1507\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"IW8PC1507\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ja16euc\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"JA16EUC\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ja16euctilde\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"JA16EUCTILDE\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ja16sjis\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"JA16SJIS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ja16sjistilde\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"JA16SJISTILDE\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ja16vms\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"JA16VMS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ko16ksc5601\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"KO16KSC5601\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ko16ksccs\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"KO16KSCCS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ko16mswin949\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"KO16MSWIN949\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/la8iso6937\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LA8ISO6937\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/la8passport\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LA8PASSPORT\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/lt8mswin921\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LT8MSWIN921\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/lt8pc772\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LT8PC772\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/lt8pc774\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LT8PC774\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/lv8pc1117\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LV8PC1117\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/lv8pc8lr\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LV8PC8LR\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/lv8rst104090\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"LV8RST104090\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/n8pc865\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"N8PC865\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ne8iso8859p10\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"NE8ISO8859P10\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/nee8iso8859p4\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"NEE8ISO8859P4\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ru8besta\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"RU8BESTA\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ru8pc855\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"RU8PC855\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/ru8pc866\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"RU8PC866\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/se8iso8859p3\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"SE8ISO8859P3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/th8macthais\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"TH8MACTHAIS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/th8tisascii\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"TH8TISASCII\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/tr8dec\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"TR8DEC\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/tr8macturkishs\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"TR8MACTURKISHS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/tr8mswin1254\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"TR8MSWIN1254\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/tr8pc857\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"TR8PC857\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/us7ascii\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"US7ASCII\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/us8pc437\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"US8PC437\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/utf8\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"UTF8\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/vn8mswin1258\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"VN8MSWIN1258\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/vn8vn3\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"VN8VN3\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8dec\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8DEC\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8dg\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8DG\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8iso8859p1\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8ISO8859P1\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8iso8859p15\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8ISO8859P15\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8iso8859p9\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8ISO8859P9\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8macroman8s\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8MACROMAN8S\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8mswin1252\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8MSWIN1252\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8ncr4970\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8NCR4970\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8nextstep\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8NEXTSTEP\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8pc850\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8PC850\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8pc858\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8PC858\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8pc860\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8PC860\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/we8roman8\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"WE8ROMAN8\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zhs16cgb231280\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHS16CGB231280\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zhs16gbk\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHS16GBK\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht16big5\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT16BIG5\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht16ccdc\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT16CCDC\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht16dbt\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT16DBT\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht16hkscs\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT16HKSCS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht16hkscs31\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT16HKSCS31\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht16mswin950\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT16MSWIN950\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht32euc\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT32EUC\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht32sops\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT32SOPS\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseCharacterSets/zht32tris\",\"type\":\"DATABASE\",\"properties\":{\"characterSet\":\"ZHT32TRIS\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Tests.ps1 new file mode 100644 index 000000000000..7533cdf42076 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseCharacterSet.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleAutonomousDatabaseCharacterSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleAutonomousDatabaseCharacterSet.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleAutonomousDatabaseCharacterSet' { + It 'List' { + { + $adbsCharacterSetList = Get-AzOracleAutonomousDatabaseCharacterSet -Location $env.location + $adbsCharacterSetList.CharacterSet.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Recording.json b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Recording.json new file mode 100644 index 000000000000..d0a890f712fa --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzOracleAutonomousDatabaseNationalCharacterSet+[NoContext]+List+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseNationalCharacterSets?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseNationalCharacterSets?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "a24f88db-bb56-462c-a077-d133ef72a8c4" ], + "CommandName": [ "Get-AzOracleAutonomousDatabaseNationalCharacterSet" ], + "FullCommandName": [ "Get-AzOracleAutonomousDatabaseNationalCharacterSet_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/21AC9B15174A2CEC1972C6B65C438942/83CF06B49E422D7C788A0659727D8162" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "f412f5bf-1f64-4a42-89fe-90b0bb6b015b" ], + "x-ms-correlation-request-id": [ "f9b516e6-a9e2-4977-9082-54850b6a7b91" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKWEST:20240705T102832Z:f9b516e6-a9e2-4977-9082-54850b6a7b91" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 44E698ED144F4D16B1FBCAE99B1E2437 Ref B: AMS231020615053 Ref C: 2024-07-05T10:28:31Z" ], + "Date": [ "Fri, 05 Jul 2024 10:28:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "429" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseNationalCharacterSets/al16utf16\",\"type\":\"NATIONAL\",\"properties\":{\"characterSet\":\"AL16UTF16\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDatabaseNationalCharacterSets/utf8\",\"type\":\"NATIONAL\",\"properties\":{\"characterSet\":\"UTF8\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Tests.ps1 new file mode 100644 index 000000000000..c32329ed383d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseNationalCharacterSet.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleAutonomousDatabaseNationalCharacterSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleAutonomousDatabaseNationalCharacterSet.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleAutonomousDatabaseNationalCharacterSet' { + It 'List' { + { + $adbsNCharacterSetList = Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location $env.location + $adbsNCharacterSetList.CharacterSet.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Recording.json b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Recording.json new file mode 100644 index 000000000000..efcd81ba9fba --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzOracleAutonomousDatabaseVersion+[NoContext]+List+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDbVersions?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDbVersions?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "74eb4271-f8fe-4310-b8bf-f4db00a3082a" ], + "CommandName": [ "Get-AzOracleAutonomousDatabaseVersion" ], + "FullCommandName": [ "Get-AzOracleAutonomousDatabaseVersion_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/375F40190A1CC258168D9635EEDEA058/F5E5823046DA9CDE4EDA9538DA1ED467" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "a4032185-f3af-4663-9fa3-516af98981e9" ], + "x-ms-correlation-request-id": [ "4dbad3be-4e9d-4b24-a868-e21cba3548cf" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240705T104649Z:4dbad3be-4e9d-4b24-a868-e21cba3548cf" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1A9A3538202D4260843014B67E5695DF Ref B: AMS231020512019 Ref C: 2024-07-05T10:46:47Z" ], + "Date": [ "Fri, 05 Jul 2024 10:46:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1344" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDbVersions/19c\",\"name\":\"19c\",\"type\":\"Oracle.Database/autonomousDbVersions\",\"properties\":{\"dbWorkload\":\"AJD\",\"isDefaultForFree\":false,\"isDefaultForPaid\":true,\"isFreeTierEnabled\":true,\"isPaidEnabled\":true,\"version\":\"19c\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDbVersions/19c\",\"name\":\"19c\",\"type\":\"Oracle.Database/autonomousDbVersions\",\"properties\":{\"dbWorkload\":\"DW\",\"isDefaultForFree\":false,\"isDefaultForPaid\":true,\"isFreeTierEnabled\":true,\"isPaidEnabled\":true,\"version\":\"19c\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDbVersions/19c\",\"name\":\"19c\",\"type\":\"Oracle.Database/autonomousDbVersions\",\"properties\":{\"dbWorkload\":\"APEX\",\"isDefaultForFree\":false,\"isDefaultForPaid\":true,\"isFreeTierEnabled\":true,\"isPaidEnabled\":true,\"version\":\"19c\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/autonomousDbVersions/19c\",\"name\":\"19c\",\"type\":\"Oracle.Database/autonomousDbVersions\",\"properties\":{\"dbWorkload\":\"OLTP\",\"isDefaultForFree\":false,\"isDefaultForPaid\":true,\"isFreeTierEnabled\":true,\"isPaidEnabled\":true,\"version\":\"19c\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Tests.ps1 new file mode 100644 index 000000000000..b092b34bd286 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleAutonomousDatabaseVersion.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleAutonomousDatabaseVersion')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleAutonomousDatabaseVersion.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleAutonomousDatabaseVersion' { + It 'List' { + { + $adbsVersionList = Get-AzOracleAutonomousDatabaseVersion -Location $env.location + $adbsVersionList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudExadataInfrastructure.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..4519dfd374da --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleCloudExadataInfrastructure' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudVMCluster.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..2e796d59b447 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleCloudVMCluster.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleCloudVMCluster' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbNode.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbNode.Tests.ps1 new file mode 100644 index 000000000000..95b77d4cddbf --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbNode.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDbNode')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDbNode.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDbNode' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCloudVMCluster' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbServer.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbServer.Tests.ps1 new file mode 100644 index 000000000000..6048514762c1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbServer.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDbServer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDbServer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDbServer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityCloudExadataInfrastructure' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Recording.json b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Recording.json new file mode 100644 index 000000000000..cfc41d2b7fa2 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzOracleDbSystemShape+[NoContext]+List+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dbSystemShapes?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dbSystemShapes?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "2c9fbcd6-9038-4acd-ab80-7cd2a1f4d41a" ], + "CommandName": [ "Get-AzOracleDbSystemShape" ], + "FullCommandName": [ "Get-AzOracleDbSystemShape_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/AEE442C52FDC3EAE872850AC05F281B9/67847171CAD79D1225C920DAE90AEB2F" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "040c4ed8-f72f-45bf-90e7-09946d443788" ], + "x-ms-correlation-request-id": [ "5e4c3dfe-b7bf-462c-a456-a59b976b2c2a" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240705T104334Z:5e4c3dfe-b7bf-462c-a456-a59b976b2c2a" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: B4BAB1229F9E40A79C220D66449C6887 Ref B: AMS231032607045 Ref C: 2024-07-05T10:43:33Z" ], + "Date": [ "Fri, 05 Jul 2024 10:43:34 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "789" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dbSystemShapes/Exadata.X9M\",\"name\":\"Exadata.X9M\",\"type\":\"Oracle.Database/Locations/dbSystemShapes\",\"properties\":{\"shapeFamily\":\"EXADATA\",\"availableCoreCount\":0,\"minimumCoreCount\":0,\"runtimeMinimumCoreCount\":null,\"coreCountIncrement\":null,\"minStorageCount\":null,\"maxStorageCount\":null,\"availableDataStoragePerServerInTbs\":null,\"availableMemoryPerNodeInGbs\":1390,\"availableDbNodePerNodeInGbs\":2243,\"minCoreCountPerNode\":0,\"availableMemoryInGbs\":null,\"minMemoryPerNodeInGbs\":30,\"availableDbNodeStorageInGbs\":null,\"minDbNodeStoragePerNodeInGbs\":60,\"availableDataStorageInTbs\":63,\"minDataStorageInTbs\":2,\"minimumNodeCount\":2,\"maximumNodeCount\":32,\"availableCoreCountPerNode\":126}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Tests.ps1 new file mode 100644 index 000000000000..63aa8472815b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDbSystemShape.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDbSystemShape')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDbSystemShape.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDbSystemShape' { + It 'List' { + { + $dbSystemShapeList = Get-AzOracleDbSystemShape -Location $env.location + $dbSystemShapeList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Recording.json b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Recording.json new file mode 100644 index 000000000000..83c3af59e8c6 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzOracleDnsPrivateView+[NoContext]+List+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "0efb8b04-cce2-4a15-9ef9-b0ae1a1b7a05" ], + "CommandName": [ "Get-AzOracleDnsPrivateView" ], + "FullCommandName": [ "Get-AzOracleDnsPrivateView_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/D8DE4AEBF4CB52BAA36977595FFDF438/2842F5668FBA8AD62F175988F7EE5F41" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "d0181d8d-fea5-435b-bc30-9924c4757180" ], + "x-ms-correlation-request-id": [ "9f5188a1-a17d-40bb-9e7e-c1626201d4ca" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240705T103410Z:9f5188a1-a17d-40bb-9e7e-c1626201d4ca" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A0AE1CF99B36416DBFE7DC469D6EDB10 Ref B: AMS231020615017 Ref C: 2024-07-05T10:34:08Z" ], + "Date": [ "Fri, 05 Jul 2024 10:34:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "40600" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza\",\"displayName\":\"VCN-multicloudnetworklink20240704155555\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza\",\"timeCreated\":\"2024-07-04T15:56:23.271Z\",\"timeUpdated\":\"2024-07-04T15:56:25.491Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaalf3jpv4bmwdg6nxw7ciudrb3smln6a46h7asgrwoironcxuoslea\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaalf3jpv4bmwdg6nxw7ciudrb3smln6a46h7asgrwoironcxuoslea\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaalf3jpv4bmwdg6nxw7ciudrb3smln6a46h7asgrwoironcxuoslea\",\"displayName\":\"VCN-multicloudnetworklink20240704151602\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaalf3jpv4bmwdg6nxw7ciudrb3smln6a46h7asgrwoironcxuoslea\",\"timeCreated\":\"2024-07-04T15:16:15.459Z\",\"timeUpdated\":\"2024-07-04T15:16:17.993Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaags4sek6p7ocgs5sjarfm26dgmz23yegxxwqk4aowebismrbbgm6q\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaags4sek6p7ocgs5sjarfm26dgmz23yegxxwqk4aowebismrbbgm6q\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaags4sek6p7ocgs5sjarfm26dgmz23yegxxwqk4aowebismrbbgm6q\",\"displayName\":\"VCN-multicloudnetworklink20240704133051\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaags4sek6p7ocgs5sjarfm26dgmz23yegxxwqk4aowebismrbbgm6q\",\"timeCreated\":\"2024-07-04T13:31:05.785Z\",\"timeUpdated\":\"2024-07-04T13:31:07.940Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaazmyd4s4uwgqfccdrhldyei7gdwvmckqe2gcf7rqyzx5745rqcz7a\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaazmyd4s4uwgqfccdrhldyei7gdwvmckqe2gcf7rqyzx5745rqcz7a\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaazmyd4s4uwgqfccdrhldyei7gdwvmckqe2gcf7rqyzx5745rqcz7a\",\"displayName\":\"VCN-multicloudnetworklink20240704035840\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaazmyd4s4uwgqfccdrhldyei7gdwvmckqe2gcf7rqyzx5745rqcz7a\",\"timeCreated\":\"2024-07-04T03:59:18.698Z\",\"timeUpdated\":\"2024-07-04T03:59:20.112Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaarnrvhq52proqtx2dxwmkktnelvh37dfplek7rfvba2eoasl5ljla\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaarnrvhq52proqtx2dxwmkktnelvh37dfplek7rfvba2eoasl5ljla\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaarnrvhq52proqtx2dxwmkktnelvh37dfplek7rfvba2eoasl5ljla\",\"displayName\":\"VCN-multicloudnetworklink20240703081526\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaarnrvhq52proqtx2dxwmkktnelvh37dfplek7rfvba2eoasl5ljla\",\"timeCreated\":\"2024-07-03T08:15:48.421Z\",\"timeUpdated\":\"2024-07-03T08:15:50.325Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"displayName\":\"VCN-multicloudnetworklink20240702175400\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"timeCreated\":\"2024-07-02T17:54:22.117Z\",\"timeUpdated\":\"2024-07-02T17:54:24.131Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaasfkjzbc3yfkh7iefqp5wgo3rw7waujjh4thx6c63bcjxsr7xgunq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaasfkjzbc3yfkh7iefqp5wgo3rw7waujjh4thx6c63bcjxsr7xgunq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaasfkjzbc3yfkh7iefqp5wgo3rw7waujjh4thx6c63bcjxsr7xgunq\",\"displayName\":\"VCN-multicloudnetworklink20240628234131\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaasfkjzbc3yfkh7iefqp5wgo3rw7waujjh4thx6c63bcjxsr7xgunq\",\"timeCreated\":\"2024-06-28T23:41:42.228Z\",\"timeUpdated\":\"2024-06-28T23:41:43.985Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaahh7hn6igc2h3hjb7yzbp6qvxdlueuptw3tqsevgd6sqmck2t67xq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaahh7hn6igc2h3hjb7yzbp6qvxdlueuptw3tqsevgd6sqmck2t67xq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaahh7hn6igc2h3hjb7yzbp6qvxdlueuptw3tqsevgd6sqmck2t67xq\",\"displayName\":\"VCN-multicloudnetworklink20240628223806\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaahh7hn6igc2h3hjb7yzbp6qvxdlueuptw3tqsevgd6sqmck2t67xq\",\"timeCreated\":\"2024-06-28T22:38:13.239Z\",\"timeUpdated\":\"2024-06-28T22:38:15.400Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa4d4te57r5kd2uiwz3nrsrupyxoq4ld6qe7llj4thyqryh4ptt7ta\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa4d4te57r5kd2uiwz3nrsrupyxoq4ld6qe7llj4thyqryh4ptt7ta\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa4d4te57r5kd2uiwz3nrsrupyxoq4ld6qe7llj4thyqryh4ptt7ta\",\"displayName\":\"VCN-multicloudnetworklink20240627210924\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa4d4te57r5kd2uiwz3nrsrupyxoq4ld6qe7llj4thyqryh4ptt7ta\",\"timeCreated\":\"2024-06-27T21:09:42.065Z\",\"timeUpdated\":\"2024-06-27T21:09:44.162Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaan3zpjnyy7hzjbsw4am75qb4r56twlyhzdachelvnvfo4t2gmg3nq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaan3zpjnyy7hzjbsw4am75qb4r56twlyhzdachelvnvfo4t2gmg3nq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaan3zpjnyy7hzjbsw4am75qb4r56twlyhzdachelvnvfo4t2gmg3nq\",\"displayName\":\"VCN-multicloudnetworklink20240627192828\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaan3zpjnyy7hzjbsw4am75qb4r56twlyhzdachelvnvfo4t2gmg3nq\",\"timeCreated\":\"2024-06-27T19:28:50.454Z\",\"timeUpdated\":\"2024-06-27T19:28:52.312Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa3jibcq6frlsxtfsgvncilhpn655j6wrj3dhbvfstot2eufmjlh6q\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa3jibcq6frlsxtfsgvncilhpn655j6wrj3dhbvfstot2eufmjlh6q\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa3jibcq6frlsxtfsgvncilhpn655j6wrj3dhbvfstot2eufmjlh6q\",\"displayName\":\"VCN-multicloudnetworklink20240625030018\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa3jibcq6frlsxtfsgvncilhpn655j6wrj3dhbvfstot2eufmjlh6q\",\"timeCreated\":\"2024-06-25T03:00:49.026Z\",\"timeUpdated\":\"2024-06-25T03:00:51.243Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaae33wuskmomxnyus5ih3dvcp5vzocs7rjmwyjy3ob5nroyltk3n4a\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaae33wuskmomxnyus5ih3dvcp5vzocs7rjmwyjy3ob5nroyltk3n4a\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaae33wuskmomxnyus5ih3dvcp5vzocs7rjmwyjy3ob5nroyltk3n4a\",\"displayName\":\"VCN-multicloudnetworklink20240625025930\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaae33wuskmomxnyus5ih3dvcp5vzocs7rjmwyjy3ob5nroyltk3n4a\",\"timeCreated\":\"2024-06-25T02:59:54.113Z\",\"timeUpdated\":\"2024-06-25T02:59:55.973Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaa7u7luleugifyox5x6wxfcox6pqhqh7m4arfddastzhcby7ywela\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaa7u7luleugifyox5x6wxfcox6pqhqh7m4arfddastzhcby7ywela\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaa7u7luleugifyox5x6wxfcox6pqhqh7m4arfddastzhcby7ywela\",\"displayName\":\"VCN-multicloudnetworklink20240624205831\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaa7u7luleugifyox5x6wxfcox6pqhqh7m4arfddastzhcby7ywela\",\"timeCreated\":\"2024-06-24T20:58:47.249Z\",\"timeUpdated\":\"2024-06-24T20:58:49.190Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaazbo3ppu46obfuvioi3ktwjzlg2d2fmnbkx7vcvpcxxxyzccsg7cq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaazbo3ppu46obfuvioi3ktwjzlg2d2fmnbkx7vcvpcxxxyzccsg7cq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaazbo3ppu46obfuvioi3ktwjzlg2d2fmnbkx7vcvpcxxxyzccsg7cq\",\"displayName\":\"VCN-multicloudnetworklink20240624154713\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaazbo3ppu46obfuvioi3ktwjzlg2d2fmnbkx7vcvpcxxxyzccsg7cq\",\"timeCreated\":\"2024-06-24T15:47:43.488Z\",\"timeUpdated\":\"2024-06-24T15:47:45.533Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaebd3s6zefr26dbsvxtbwnaf6ryi5sm7jwhfw7l2xcczut67pp6zq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaebd3s6zefr26dbsvxtbwnaf6ryi5sm7jwhfw7l2xcczut67pp6zq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaebd3s6zefr26dbsvxtbwnaf6ryi5sm7jwhfw7l2xcczut67pp6zq\",\"displayName\":\"VCN-multicloudnetworklink20240621175846\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaebd3s6zefr26dbsvxtbwnaf6ryi5sm7jwhfw7l2xcczut67pp6zq\",\"timeCreated\":\"2024-06-21T17:59:09.697Z\",\"timeUpdated\":\"2024-06-21T17:59:10.424Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaadqjwjdlyrljtif3tzqeuhljlt7hiitedjobr2zf2oac2amylboyq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaadqjwjdlyrljtif3tzqeuhljlt7hiitedjobr2zf2oac2amylboyq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaadqjwjdlyrljtif3tzqeuhljlt7hiitedjobr2zf2oac2amylboyq\",\"displayName\":\"VCN-multicloudnetworklink20240620170820\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaadqjwjdlyrljtif3tzqeuhljlt7hiitedjobr2zf2oac2amylboyq\",\"timeCreated\":\"2024-06-20T17:08:44.118Z\",\"timeUpdated\":\"2024-06-20T17:08:46.199Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"displayName\":\"VCN-multicloudnetworklink20240619143753\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"timeCreated\":\"2024-06-19T14:38:16.804Z\",\"timeUpdated\":\"2024-06-19T14:38:19.206Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaam6mulme3e6ib2oewncnm7ziwiegzvmqprk3aphxr7hfzvotcojea\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaam6mulme3e6ib2oewncnm7ziwiegzvmqprk3aphxr7hfzvotcojea\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaam6mulme3e6ib2oewncnm7ziwiegzvmqprk3aphxr7hfzvotcojea\",\"displayName\":\"VCN-multicloudnetworklink20240613222842\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaam6mulme3e6ib2oewncnm7ziwiegzvmqprk3aphxr7hfzvotcojea\",\"timeCreated\":\"2024-06-13T22:29:06.686Z\",\"timeUpdated\":\"2024-06-13T22:29:08.643Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa2fm5l2pzpuj53f6xwsbno5kh2ozthcibmwwlz4r44l6ds4oirjvq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa2fm5l2pzpuj53f6xwsbno5kh2ozthcibmwwlz4r44l6ds4oirjvq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa2fm5l2pzpuj53f6xwsbno5kh2ozthcibmwwlz4r44l6ds4oirjvq\",\"displayName\":\"VCN-multicloudnetworklink20240613214647\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa2fm5l2pzpuj53f6xwsbno5kh2ozthcibmwwlz4r44l6ds4oirjvq\",\"timeCreated\":\"2024-06-13T21:47:03.586Z\",\"timeUpdated\":\"2024-06-13T21:47:05.657Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaakdvcobjg63flojxhajg6frjuulzvm3ujwvlq5md72aioxwhztp4a\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaakdvcobjg63flojxhajg6frjuulzvm3ujwvlq5md72aioxwhztp4a\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaakdvcobjg63flojxhajg6frjuulzvm3ujwvlq5md72aioxwhztp4a\",\"displayName\":\"VCN-multicloudnetworklink20240613135637\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaakdvcobjg63flojxhajg6frjuulzvm3ujwvlq5md72aioxwhztp4a\",\"timeCreated\":\"2024-06-13T13:56:59.209Z\",\"timeUpdated\":\"2024-06-13T13:57:00.848Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaadnfesiej4lwha3bqamzc5c5jbc52fviao5dsz5t7gymd2dhbf5xa\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaadnfesiej4lwha3bqamzc5c5jbc52fviao5dsz5t7gymd2dhbf5xa\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaadnfesiej4lwha3bqamzc5c5jbc52fviao5dsz5t7gymd2dhbf5xa\",\"displayName\":\"VCN-multicloudnetworklink20240613000648\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaadnfesiej4lwha3bqamzc5c5jbc52fviao5dsz5t7gymd2dhbf5xa\",\"timeCreated\":\"2024-06-13T00:07:09.804Z\",\"timeUpdated\":\"2024-06-13T00:07:11.688Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaacnlnbnfwl4yqjmc6duyff24oarf53rx4t45gmxebo5dd3bo2spmq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaacnlnbnfwl4yqjmc6duyff24oarf53rx4t45gmxebo5dd3bo2spmq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaacnlnbnfwl4yqjmc6duyff24oarf53rx4t45gmxebo5dd3bo2spmq\",\"displayName\":\"VCN-multicloudnetworklink20240612222617\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaacnlnbnfwl4yqjmc6duyff24oarf53rx4t45gmxebo5dd3bo2spmq\",\"timeCreated\":\"2024-06-12T22:26:42.912Z\",\"timeUpdated\":\"2024-06-12T22:26:44.866Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaasnob6ag6wg6pmacj43cenkffel4ufxi7c2zk2s2rm47wu4zhmzjq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaasnob6ag6wg6pmacj43cenkffel4ufxi7c2zk2s2rm47wu4zhmzjq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaasnob6ag6wg6pmacj43cenkffel4ufxi7c2zk2s2rm47wu4zhmzjq\",\"displayName\":\"VCN-multicloudnetworklink20240612133707\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaasnob6ag6wg6pmacj43cenkffel4ufxi7c2zk2s2rm47wu4zhmzjq\",\"timeCreated\":\"2024-06-12T13:37:29.696Z\",\"timeUpdated\":\"2024-06-12T13:37:31.529Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaacl3b74znruhwqzliqny3kh522bc2v3kx4j6egx7gpz3jj6prmq7a\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaacl3b74znruhwqzliqny3kh522bc2v3kx4j6egx7gpz3jj6prmq7a\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaacl3b74znruhwqzliqny3kh522bc2v3kx4j6egx7gpz3jj6prmq7a\",\"displayName\":\"VCN-multicloudnetworklink20240612051003\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaacl3b74znruhwqzliqny3kh522bc2v3kx4j6egx7gpz3jj6prmq7a\",\"timeCreated\":\"2024-06-12T05:10:28.471Z\",\"timeUpdated\":\"2024-06-12T05:10:29.982Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaawwky4j2igeyhsiiymg4ck3asdtbdtodasiwmix5gpmtz6tdsk2sa\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaawwky4j2igeyhsiiymg4ck3asdtbdtodasiwmix5gpmtz6tdsk2sa\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaawwky4j2igeyhsiiymg4ck3asdtbdtodasiwmix5gpmtz6tdsk2sa\",\"displayName\":\"VCN-multicloudnetworklink20240606182920\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaawwky4j2igeyhsiiymg4ck3asdtbdtodasiwmix5gpmtz6tdsk2sa\",\"timeCreated\":\"2024-06-06T18:29:39.231Z\",\"timeUpdated\":\"2024-06-06T18:29:40.959Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaabshazqhwh6pfue2t7x4wnvmu333ug7kv7goccwy76ek2fdhw7frq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaabshazqhwh6pfue2t7x4wnvmu333ug7kv7goccwy76ek2fdhw7frq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaabshazqhwh6pfue2t7x4wnvmu333ug7kv7goccwy76ek2fdhw7frq\",\"displayName\":\"VCN-multicloudnetworklink20240605195415\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaabshazqhwh6pfue2t7x4wnvmu333ug7kv7goccwy76ek2fdhw7frq\",\"timeCreated\":\"2024-06-05T19:54:40.458Z\",\"timeUpdated\":\"2024-06-05T19:54:42.655Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.amaaaaaanirvylqavprecsjhqzozhzhubrv5zh2zkc7rbzebv5htjaowyhpq\",\"name\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqavprecsjhqzozhzhubrv5zh2zkc7rbzebv5htjaowyhpq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqavprecsjhqzozhzhubrv5zh2zkc7rbzebv5htjaowyhpq\",\"displayName\":\"spalimpaTestDnsView\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.amaaaaaanirvylqavprecsjhqzozhzhubrv5zh2zkc7rbzebv5htjaowyhpq\",\"timeCreated\":\"2024-06-03T22:05:53.669Z\",\"timeUpdated\":\"2024-06-03T22:05:53.669Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaacn72hqgq74txfgtuwo3ddlgkspw2vz4eldxrme7texgsugxp5x3a\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaacn72hqgq74txfgtuwo3ddlgkspw2vz4eldxrme7texgsugxp5x3a\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaacn72hqgq74txfgtuwo3ddlgkspw2vz4eldxrme7texgsugxp5x3a\",\"displayName\":\"VCN-multicloudnetworklink20240603184418\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaacn72hqgq74txfgtuwo3ddlgkspw2vz4eldxrme7texgsugxp5x3a\",\"timeCreated\":\"2024-06-03T18:44:27.818Z\",\"timeUpdated\":\"2024-06-03T18:44:29.917Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.amaaaaaanirvylqahnekoidsqbfml7bpjcujxtreo24uesvwahbixqcvrdwa\",\"name\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqahnekoidsqbfml7bpjcujxtreo24uesvwahbixqcvrdwa\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqahnekoidsqbfml7bpjcujxtreo24uesvwahbixqcvrdwa\",\"displayName\":\"MaxTestDnsView\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.amaaaaaanirvylqahnekoidsqbfml7bpjcujxtreo24uesvwahbixqcvrdwa\",\"timeCreated\":\"2024-06-03T16:44:17.124Z\",\"timeUpdated\":\"2024-06-03T16:44:17.124Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaahjczll6evlberotb4inm7yihkpj2nzie3zcicxidot3wucc634eq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaahjczll6evlberotb4inm7yihkpj2nzie3zcicxidot3wucc634eq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaahjczll6evlberotb4inm7yihkpj2nzie3zcicxidot3wucc634eq\",\"displayName\":\"VCN-multicloudnetworklink20240531193821\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaahjczll6evlberotb4inm7yihkpj2nzie3zcicxidot3wucc634eq\",\"timeCreated\":\"2024-05-31T19:38:43.345Z\",\"timeUpdated\":\"2024-05-31T19:38:45.554Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"displayName\":\"VCN-multicloudnetworklink20240530204655\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"timeCreated\":\"2024-05-30T20:47:14.327Z\",\"timeUpdated\":\"2024-05-30T20:47:16.405Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaalambtijdib5a3nldvzzxet67vbvdynj3uzsffm23vej25vidgtqq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaalambtijdib5a3nldvzzxet67vbvdynj3uzsffm23vej25vidgtqq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaalambtijdib5a3nldvzzxet67vbvdynj3uzsffm23vej25vidgtqq\",\"displayName\":\"VCN-multicloudnetworklink20240530182105\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaalambtijdib5a3nldvzzxet67vbvdynj3uzsffm23vej25vidgtqq\",\"timeCreated\":\"2024-05-30T18:21:39.043Z\",\"timeUpdated\":\"2024-05-30T18:21:41.255Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaar3sf4g3t5n37ak7jdfjdlgkxon7vqxrantbh66a5zdaf4pmsj3q\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaar3sf4g3t5n37ak7jdfjdlgkxon7vqxrantbh66a5zdaf4pmsj3q\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaar3sf4g3t5n37ak7jdfjdlgkxon7vqxrantbh66a5zdaf4pmsj3q\",\"displayName\":\"VCN-multicloudnetworklink20240528150557\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaar3sf4g3t5n37ak7jdfjdlgkxon7vqxrantbh66a5zdaf4pmsj3q\",\"timeCreated\":\"2024-05-28T15:06:28.154Z\",\"timeUpdated\":\"2024-05-28T15:06:30.011Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa7zpfwvaipbz6jhjlkr5rpm2pmwdjckigattvcv2bblnhbi6wbfca\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa7zpfwvaipbz6jhjlkr5rpm2pmwdjckigattvcv2bblnhbi6wbfca\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa7zpfwvaipbz6jhjlkr5rpm2pmwdjckigattvcv2bblnhbi6wbfca\",\"displayName\":\"VCN-multicloudnetworklink20240523185434\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa7zpfwvaipbz6jhjlkr5rpm2pmwdjckigattvcv2bblnhbi6wbfca\",\"timeCreated\":\"2024-05-23T18:54:47.496Z\",\"timeUpdated\":\"2024-05-23T18:54:49.359Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaae42p4btkcvdoe7q44zq5og6wvw7bpse2mpkiancqpdvtjf6zibtq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaae42p4btkcvdoe7q44zq5og6wvw7bpse2mpkiancqpdvtjf6zibtq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaae42p4btkcvdoe7q44zq5og6wvw7bpse2mpkiancqpdvtjf6zibtq\",\"displayName\":\"VCN-multicloudnetworklink20240523150156\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaae42p4btkcvdoe7q44zq5og6wvw7bpse2mpkiancqpdvtjf6zibtq\",\"timeCreated\":\"2024-05-23T15:02:09.022Z\",\"timeUpdated\":\"2024-05-23T15:02:11.210Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaai6hsw24kp35c2nln6za6n2p5co4nibufpa2l4uooanlnjqalmglq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaai6hsw24kp35c2nln6za6n2p5co4nibufpa2l4uooanlnjqalmglq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaai6hsw24kp35c2nln6za6n2p5co4nibufpa2l4uooanlnjqalmglq\",\"displayName\":\"VCN-multicloudnetworklink20240523070835\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaai6hsw24kp35c2nln6za6n2p5co4nibufpa2l4uooanlnjqalmglq\",\"timeCreated\":\"2024-05-23T07:09:10.414Z\",\"timeUpdated\":\"2024-05-23T07:09:12.384Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaaajoznx7ifv4jvbadj3ccja7yiahyl4jocliuuyddkin2gbp5nua\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaaajoznx7ifv4jvbadj3ccja7yiahyl4jocliuuyddkin2gbp5nua\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaaajoznx7ifv4jvbadj3ccja7yiahyl4jocliuuyddkin2gbp5nua\",\"displayName\":\"VCN-multicloudnetworklink20240523001016\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaaajoznx7ifv4jvbadj3ccja7yiahyl4jocliuuyddkin2gbp5nua\",\"timeCreated\":\"2024-05-23T00:10:48.067Z\",\"timeUpdated\":\"2024-05-23T00:10:50.215Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa63j2mvogwykcxu4jnjlfcwxqlunu3ceiby3izafruyosv4j4ghpa\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa63j2mvogwykcxu4jnjlfcwxqlunu3ceiby3izafruyosv4j4ghpa\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa63j2mvogwykcxu4jnjlfcwxqlunu3ceiby3izafruyosv4j4ghpa\",\"displayName\":\"VCN-multicloudnetworklink20240503170952\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa63j2mvogwykcxu4jnjlfcwxqlunu3ceiby3izafruyosv4j4ghpa\",\"timeCreated\":\"2024-05-03T17:10:12.675Z\",\"timeUpdated\":\"2024-05-03T17:10:15.107Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaboxvqwa65555p7u4g3yr55kamhj5hzd676w53c4xrokwfvdh25sq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaboxvqwa65555p7u4g3yr55kamhj5hzd676w53c4xrokwfvdh25sq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaboxvqwa65555p7u4g3yr55kamhj5hzd676w53c4xrokwfvdh25sq\",\"displayName\":\"VCN-multicloudnetworklink20240502190731\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaboxvqwa65555p7u4g3yr55kamhj5hzd676w53c4xrokwfvdh25sq\",\"timeCreated\":\"2024-05-02T19:08:07.874Z\",\"timeUpdated\":\"2024-05-02T19:08:09.852Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaainzhp3afn4raviq24b6x3hkzzokn2cpqthig7iat2uh3zya72o2a\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaainzhp3afn4raviq24b6x3hkzzokn2cpqthig7iat2uh3zya72o2a\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaainzhp3afn4raviq24b6x3hkzzokn2cpqthig7iat2uh3zya72o2a\",\"displayName\":\"VCN-multicloudnetworklink20240501154652\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaainzhp3afn4raviq24b6x3hkzzokn2cpqthig7iat2uh3zya72o2a\",\"timeCreated\":\"2024-05-01T15:47:29.329Z\",\"timeUpdated\":\"2024-05-01T15:47:31.349Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaahd6rc62hisdbgprchfc3oyt5x3vrvu6acaejhi6zxr2os6viwhbq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaahd6rc62hisdbgprchfc3oyt5x3vrvu6acaejhi6zxr2os6viwhbq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaahd6rc62hisdbgprchfc3oyt5x3vrvu6acaejhi6zxr2os6viwhbq\",\"displayName\":\"VCN-multicloudnetworklink20240430105747\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaahd6rc62hisdbgprchfc3oyt5x3vrvu6acaejhi6zxr2os6viwhbq\",\"timeCreated\":\"2024-04-30T10:58:09.214Z\",\"timeUpdated\":\"2024-04-30T10:58:11.548Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaakhvc2vjgh4hdubzt5h3yu6vaseucqrzjmqwt6ihkjeneloduv6qa\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaakhvc2vjgh4hdubzt5h3yu6vaseucqrzjmqwt6ihkjeneloduv6qa\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaakhvc2vjgh4hdubzt5h3yu6vaseucqrzjmqwt6ihkjeneloduv6qa\",\"displayName\":\"VCN-multicloudnetworklink20240426230135\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaakhvc2vjgh4hdubzt5h3yu6vaseucqrzjmqwt6ihkjeneloduv6qa\",\"timeCreated\":\"2024-04-26T23:02:10.222Z\",\"timeUpdated\":\"2024-04-26T23:02:12.479Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaxjlankdk4o3lzq5ernpaq2yws4k2njbv6yaxi3w7yawjojred5xa\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaxjlankdk4o3lzq5ernpaq2yws4k2njbv6yaxi3w7yawjojred5xa\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaxjlankdk4o3lzq5ernpaq2yws4k2njbv6yaxi3w7yawjojred5xa\",\"displayName\":\"VCN-multicloudnetworklink20240419120909\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaxjlankdk4o3lzq5ernpaq2yws4k2njbv6yaxi3w7yawjojred5xa\",\"timeCreated\":\"2024-04-19T12:09:37.786Z\",\"timeUpdated\":\"2024-04-19T12:09:40.047Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaahugndvzacan2iivlzm7kb7j2e4swz5szwtyrzf5gykx2c6ifuh6a\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaahugndvzacan2iivlzm7kb7j2e4swz5szwtyrzf5gykx2c6ifuh6a\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaahugndvzacan2iivlzm7kb7j2e4swz5szwtyrzf5gykx2c6ifuh6a\",\"displayName\":\"VCN-multicloudnetworklink20240417195522\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaahugndvzacan2iivlzm7kb7j2e4swz5szwtyrzf5gykx2c6ifuh6a\",\"timeCreated\":\"2024-04-17T19:55:39.595Z\",\"timeUpdated\":\"2024-04-17T19:55:41.710Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"displayName\":\"VCN-multicloudnetworklink20240417120644\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"timeCreated\":\"2024-04-17T12:07:25.246Z\",\"timeUpdated\":\"2024-04-17T12:07:27.228Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaatle4wjrmfronppo5rlezom7k73ghwobdfpzkyxtg6bzguq4hwsbq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaatle4wjrmfronppo5rlezom7k73ghwobdfpzkyxtg6bzguq4hwsbq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaatle4wjrmfronppo5rlezom7k73ghwobdfpzkyxtg6bzguq4hwsbq\",\"displayName\":\"VCN-multicloudnetworklink20240405100417\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaatle4wjrmfronppo5rlezom7k73ghwobdfpzkyxtg6bzguq4hwsbq\",\"timeCreated\":\"2024-04-05T10:05:00.516Z\",\"timeUpdated\":\"2024-04-05T10:05:02.342Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaan7aluku6kbs4kqjyibpulphfmkss6dow6bn2qaxxwfedcv6jfkmq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaan7aluku6kbs4kqjyibpulphfmkss6dow6bn2qaxxwfedcv6jfkmq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaan7aluku6kbs4kqjyibpulphfmkss6dow6bn2qaxxwfedcv6jfkmq\",\"displayName\":\"VCN-multicloudnetworklink20240312194018\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaan7aluku6kbs4kqjyibpulphfmkss6dow6bn2qaxxwfedcv6jfkmq\",\"timeCreated\":\"2024-03-12T19:41:03.156Z\",\"timeUpdated\":\"2024-03-12T19:41:05.510Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa5pegcnpgikfbbmnswt6wg3wpxakvowirvkpqz5lskkkydy3sjglq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa5pegcnpgikfbbmnswt6wg3wpxakvowirvkpqz5lskkkydy3sjglq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa5pegcnpgikfbbmnswt6wg3wpxakvowirvkpqz5lskkkydy3sjglq\",\"displayName\":\"VCN-xiaoxuew_dns_fwd\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa5pegcnpgikfbbmnswt6wg3wpxakvowirvkpqz5lskkkydy3sjglq\",\"timeCreated\":\"2024-03-05T21:14:59.101Z\",\"timeUpdated\":\"2024-03-05T21:15:01.218Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa3i6q4mwhal3jjcfbv5oo3jruijf43me3u7ro46xhj7dncba2anfq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa3i6q4mwhal3jjcfbv5oo3jruijf43me3u7ro46xhj7dncba2anfq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa3i6q4mwhal3jjcfbv5oo3jruijf43me3u7ro46xhj7dncba2anfq\",\"displayName\":\"VCN-multicloudnetworklink20240111024708\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa3i6q4mwhal3jjcfbv5oo3jruijf43me3u7ro46xhj7dncba2anfq\",\"timeCreated\":\"2024-01-11T02:47:22.155Z\",\"timeUpdated\":\"2024-01-11T02:47:24.944Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateViews/ocid1.dnsview.oc1.iad.aaaaaaaa6rplfk5emrpuk5bhe7hmnhyqj5xg3zpvqwf27oowux6forjjk3wq\",\"name\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6rplfk5emrpuk5bhe7hmnhyqj5xg3zpvqwf27oowux6forjjk3wq\",\"type\":\"Oracle.Database/Locations/dnsPrivateViews\",\"properties\":{\"ocid\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6rplfk5emrpuk5bhe7hmnhyqj5xg3zpvqwf27oowux6forjjk3wq\",\"displayName\":\"VCN-multicloudnetworklink20240109185203\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/views/ocid1.dnsview.oc1.iad.aaaaaaaa6rplfk5emrpuk5bhe7hmnhyqj5xg3zpvqwf27oowux6forjjk3wq\",\"timeCreated\":\"2024-01-09T18:52:26.271Z\",\"timeUpdated\":\"2024-05-23T07:10:02.815Z\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Tests.ps1 new file mode 100644 index 000000000000..42969510f4e0 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateView.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDnsPrivateView')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDnsPrivateView.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDnsPrivateView' { + It 'List' { + { + $dnsPrivateViewList = Get-AzOracleDnsPrivateView -Location $env.location + $dnsPrivateViewList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Recording.json b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Recording.json new file mode 100644 index 000000000000..e7a7cfddd30c --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzOracleDnsPrivateZone+[NoContext]+List+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "246a5a75-2470-4073-a11e-85ac87968cbe" ], + "CommandName": [ "Get-AzOracleDnsPrivateZone" ], + "FullCommandName": [ "Get-AzOracleDnsPrivateZone_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/4BEB4BBC1F9C726BEC96321CF1880AF6/3DB357DB3EFDDED30C4D460A7C2AA866" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "6be3666a-90a7-4e7e-8646-ec025af9c7bf" ], + "x-ms-correlation-request-id": [ "2a5bd22e-f7ee-498c-a3d1-947c76247b72" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKWEST:20240705T103244Z:2a5bd22e-f7ee-498c-a3d1-947c76247b72" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 6DAAE420E817451A9DF44B9B8BF51E24 Ref B: AMS231020512045 Ref C: 2024-07-05T10:32:41Z" ], + "Date": [ "Fri, 05 Jul 2024 10:32:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "67802" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocibackupdeleg.ocipstestvnet.oraclevcn.com\",\"name\":\"ocibackupdeleg.ocipstestvnet.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaholrpbvsgqwsqyakmowa2vj7d6epusf6p5o6lvplnhfeoydsj7rq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaholrpbvsgqwsqyakmowa2vj7d6epusf6p5o6lvplnhfeoydsj7rq\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-04T16:00:50.464Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidelegated.ocipstestvnet.oraclevcn.com\",\"name\":\"ocidelegated.ocipstestvnet.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-04T15:56:26.678Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocibackupdeleg.ocidbqavcn1.oraclevcn.com\",\"name\":\"ocibackupdeleg.ocidbqavcn1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaacx64by45y2pipky3wi3nbv3jwo3oid5doqiapdgldmj4rc7535aq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaacx64by45y2pipky3wi3nbv3jwo3oid5doqiapdgldmj4rc7535aq\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaazmyd4s4uwgqfccdrhldyei7gdwvmckqe2gcf7rqyzx5745rqcz7a\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-04T04:02:38.916Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidelegated.ocidbqavcn1.oraclevcn.com\",\"name\":\"ocidelegated.ocidbqavcn1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaazuiq2jepw622jmc4dmbhcbzispdwzgg2gkzg2emi7cko2x7cuahq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaazuiq2jepw622jmc4dmbhcbzispdwzgg2gkzg2emi7cko2x7cuahq\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaazmyd4s4uwgqfccdrhldyei7gdwvmckqe2gcf7rqyzx5745rqcz7a\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-04T03:59:20.598Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/oui8ipy0.ocidelegated.ocidarenvnet.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"oui8ipy0.ocidelegated.ocidarenvnet.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaam563f3cjrbly4mx6khcp7d6vjrlyz26z4sqa6g6epian3hvz4itq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaam563f3cjrbly4mx6khcp7d6vjrlyz26z4sqa6g6epian3hvz4itq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T18:26:04.384Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/oui8ipy0.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"oui8ipy0.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaambbgq5ddkr3aknt4gg45btysa5yzysxxobvznhbyy3otr3lxao3a\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaambbgq5ddkr3aknt4gg45btysa5yzysxxobvznhbyy3otr3lxao3a\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T18:25:57.372Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/oui8ipy0.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"oui8ipy0.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa3lgfw6wj4g7ewdca55aa6hq2xtqimzcksajrjdsq6zfk4agijjha\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa3lgfw6wj4g7ewdca55aa6hq2xtqimzcksajrjdsq6zfk4agijjha\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T18:25:50.993Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/oui8ipy0.ocidelegated.ocidarenvnet.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"oui8ipy0.ocidelegated.ocidarenvnet.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaasmuboqsy6pku36m2jvxxx2c54hm7mqxn25p4pim2y7g3gwtms73a\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaasmuboqsy6pku36m2jvxxx2c54hm7mqxn25p4pim2y7g3gwtms73a\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T18:25:45.498Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"oui8ipy0.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaanxiivmfxemec7gjwm7hnrg3n7suzq3i7qibedabh77qfiqa77ina\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaanxiivmfxemec7gjwm7hnrg3n7suzq3i7qibedabh77qfiqa77ina\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T18:25:39.909Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/oui8ipy0.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"oui8ipy0.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaahy2rgedscjsu2qqaurrtmmfgdjlwzjj4fycx5i5azrcx5y7b3g7q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaahy2rgedscjsu2qqaurrtmmfgdjlwzjj4fycx5i5azrcx5y7b3g7q\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T18:25:33.198Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidelegated.ocidarenvnet.oraclevcn.com\",\"name\":\"ocidelegated.ocidarenvnet.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa4qpgs7rynrexxpddmnogirqtrb6leccx5ndvdzgejty4wfp3bdbq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa4qpgs7rynrexxpddmnogirqtrb6leccx5ndvdzgejty4wfp3bdbq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaamjmgxzpu5phmeukw2awzkomljqewcnc3xia47hwq7vwzizb3vyq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T17:54:25.690Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/haisu723.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"haisu723.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaznknfnvtcighms4gwqma4naphja7bauvl6id34zikbw5ds4qjbqa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaznknfnvtcighms4gwqma4naphja7bauvl6id34zikbw5ds4qjbqa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T03:22:52.130Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/haisu723.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"haisu723.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaqgfa2ne43mhr53dctsmvofypebdho25ti2c5wlyrsz6tdwjxmokq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaqgfa2ne43mhr53dctsmvofypebdho25ti2c5wlyrsz6tdwjxmokq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T03:22:45.007Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/haisu723.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"haisu723.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaj7o5y5ne7nwmo6gcwri2sypotzedmo5y4mgzoyez6xmsygkwpk6q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaj7o5y5ne7nwmo6gcwri2sypotzedmo5y4mgzoyez6xmsygkwpk6q\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T03:22:39.398Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/haisu723.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"haisu723.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa5nn6m6vtm5fseuua722qb2burjj47mbundxxv76vdim52fguf7ca\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa5nn6m6vtm5fseuua722qb2burjj47mbundxxv76vdim52fguf7ca\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T03:22:32.928Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/haisu723.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"haisu723.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaatsm6g7kbgonxvoxicyufnvrlif74mpg2mm5jxcrzlkwx2z7fbdqa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaatsm6g7kbgonxvoxicyufnvrlif74mpg2mm5jxcrzlkwx2z7fbdqa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T03:22:27.438Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/haisu723.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"haisu723.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaynvaamvmw5vryg2plubrlrjovwqqwd7vaoggzatpug3qxmyzlfha\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaynvaamvmw5vryg2plubrlrjovwqqwd7vaoggzatpug3qxmyzlfha\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T03:22:21.867Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wvrdwnp0.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"wvrdwnp0.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaemodaieiilzxnl44vnbdyh4jblisq3dqiee7macpgeujikg34ttq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaemodaieiilzxnl44vnbdyh4jblisq3dqiee7macpgeujikg34ttq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T01:57:36.395Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wvrdwnp0.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"wvrdwnp0.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaasqhrg27hf4gijb2gyvr7ezl62rrgc3kywk7sld4adud2gsdfwoaa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaasqhrg27hf4gijb2gyvr7ezl62rrgc3kywk7sld4adud2gsdfwoaa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T01:57:31.116Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wvrdwnp0.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"wvrdwnp0.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaak2gtpteugz42je5dkisgq2lmsojbpkvcwnb4ezxzgobpwupb2ijq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaak2gtpteugz42je5dkisgq2lmsojbpkvcwnb4ezxzgobpwupb2ijq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T01:57:24.912Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wvrdwnp0.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"wvrdwnp0.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaqdrqhdvefz62qxhhssuwak6zbj34ypvpqyjwq2akk2gehm6xjciq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaqdrqhdvefz62qxhhssuwak6zbj34ypvpqyjwq2akk2gehm6xjciq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T01:57:18.873Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"wvrdwnp0.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaafz5rqqpgoos53gixkuauzkccpg4ikvamw5ya65cndoo2epvckgiq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaafz5rqqpgoos53gixkuauzkccpg4ikvamw5ya65cndoo2epvckgiq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T01:57:13.167Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wvrdwnp0.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"wvrdwnp0.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaumcq32g36sejqk3f3rlcbhk4ynz5eyvhobfnhcnlnpfh4qdrcq5q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaumcq32g36sejqk3f3rlcbhk4ynz5eyvhobfnhcnlnpfh4qdrcq5q\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-02T01:57:07.726Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/pfwukijt.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"pfwukijt.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaapmlh4ml3nkywgkxjika24wodegjhv2lay27e3rp4275fdo2pt7uq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaapmlh4ml3nkywgkxjika24wodegjhv2lay27e3rp4275fdo2pt7uq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T21:28:52.554Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/pfwukijt.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"pfwukijt.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaag3ciwngdckegokum247feszxs45jvljiddby4sgudpnnjr2z2okq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaag3ciwngdckegokum247feszxs45jvljiddby4sgudpnnjr2z2okq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T21:28:45.848Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/pfwukijt.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"pfwukijt.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa4keu3jjjcwvjdagushalucjtnewuwjd3e4uq2qaw2h7xgg3ymtxq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa4keu3jjjcwvjdagushalucjtnewuwjd3e4uq2qaw2h7xgg3ymtxq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T21:28:39.332Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/pfwukijt.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"pfwukijt.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa3gxwrpl7modteekrmbagtnplehlwixjvvy5zmwjbk442spa6jega\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa3gxwrpl7modteekrmbagtnplehlwixjvvy5zmwjbk442spa6jega\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T21:28:33.062Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/pfwukijt.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"pfwukijt.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaan5hx6qnz4r44rc5slfdyumftpadtllutmrifgnnfhelag6s7icza\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaan5hx6qnz4r44rc5slfdyumftpadtllutmrifgnnfhelag6s7icza\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T21:28:26.763Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/pfwukijt.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"pfwukijt.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaawnkzvqj3nk22p2zplmthehtypfwkkyaph2gcxzuxius4eb4v72ja\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaawnkzvqj3nk22p2zplmthehtypfwkkyaph2gcxzuxius4eb4v72ja\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T21:28:17.562Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/y7sttfq6.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"y7sttfq6.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa75x5jrre7b4ifbef4n2sh2igjsuwh5unfidf4y62tkxieahh36ba\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa75x5jrre7b4ifbef4n2sh2igjsuwh5unfidf4y62tkxieahh36ba\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T20:43:39.501Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/y7sttfq6.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"y7sttfq6.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaahrnsk7etxbhq4zyirjguv3unmeb7wnicf3sexjnppjeextwwlgoq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaahrnsk7etxbhq4zyirjguv3unmeb7wnicf3sexjnppjeextwwlgoq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T20:43:33.460Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/y7sttfq6.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"y7sttfq6.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaafvx2dpilsxxingu37f3lxwuxfes7wisy33zgegjkzu5toklmh63a\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaafvx2dpilsxxingu37f3lxwuxfes7wisy33zgegjkzu5toklmh63a\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T20:43:26.224Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/y7sttfq6.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"y7sttfq6.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa4geheitadoi7jxbu7xkyt2elextyxlftjq3dx7lhs6bzdbfjhslq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa4geheitadoi7jxbu7xkyt2elextyxlftjq3dx7lhs6bzdbfjhslq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T20:43:20.391Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"y7sttfq6.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaairx7p2gkuppyqsihdk3sqeddkcc2ejglhuuq2qtqe3m4ar7mdzea\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaairx7p2gkuppyqsihdk3sqeddkcc2ejglhuuq2qtqe3m4ar7mdzea\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T20:43:14.335Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/y7sttfq6.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"y7sttfq6.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa4urwa4w263uqvnd5pwbzjljywvple4kbe45o3ypcev5ypd2fwdha\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa4urwa4w263uqvnd5pwbzjljywvple4kbe45o3ypcev5ypd2fwdha\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-07-01T20:43:07.309Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocibackupdg1.oci0409vn.oraclevcn.com\",\"name\":\"ocibackupdg1.oci0409vn.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaawrxyflrubrthuiqsvcq22bzpjkjioqhdgwkzg6x4gzozpbkg4nzq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaawrxyflrubrthuiqsvcq22bzpjkjioqhdgwkzg6x4gzozpbkg4nzq\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaabshazqhwh6pfue2t7x4wnvmu333ug7kv7goccwy76ek2fdhw7frq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-27T16:57:55.192Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/vifnfx8g.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"vifnfx8g.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaainbefubl2diqmuaez6jfwez7w4ylpxihwckqfhdqpk7gtqjvo6qa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaainbefubl2diqmuaez6jfwez7w4ylpxihwckqfhdqpk7gtqjvo6qa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-27T04:02:03.817Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/vifnfx8g.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"vifnfx8g.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa3lbaebut574fiebyuzml5fqj65n4wfdgav4sc5n6d7rguk3ryioq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa3lbaebut574fiebyuzml5fqj65n4wfdgav4sc5n6d7rguk3ryioq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-27T04:01:57.326Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/vifnfx8g.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"vifnfx8g.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaapteflualm6c257aptyqlpxklbyiswdbxbckxvahvu7wi4ukppwwa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaapteflualm6c257aptyqlpxklbyiswdbxbckxvahvu7wi4ukppwwa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-27T04:01:51.253Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/vifnfx8g.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"vifnfx8g.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaoqclmd7bdkvwthuy7utnp4dcxqtyuvpegx7epzp4lqgejuj3ytpq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaoqclmd7bdkvwthuy7utnp4dcxqtyuvpegx7epzp4lqgejuj3ytpq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-27T04:01:45.283Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"vifnfx8g.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa4uaqju55vcivy3nuken4vts65qfvwo2v2bls4p26s76nhpxahlta\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa4uaqju55vcivy3nuken4vts65qfvwo2v2bls4p26s76nhpxahlta\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-27T04:01:38.889Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/vifnfx8g.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"vifnfx8g.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaawbts7s4ir6odapumihdgnes64g5sc22if4n2qiay7eav63hxcsda\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaawbts7s4ir6odapumihdgnes64g5sc22if4n2qiay7eav63hxcsda\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-27T04:01:32.073Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/spalimpa.new.com\",\"name\":\"spalimpa.new.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaabifdsmn7llr7kcgzdvfiyvzsmstndvuychezi7erm3dt7g5t2drq\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaabifdsmn7llr7kcgzdvfiyvzsmstndvuychezi7erm3dt7g5t2drq\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqavprecsjhqzozhzhubrv5zh2zkc7rbzebv5htjaowyhpq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-24T20:06:22.884Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wk2pxbuc.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"wk2pxbuc.ocidefault2.ocidbqavnetjun.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaauek3h2uqdqahflx6g3apxusjlzt7ua25cqghozphzh7i2dusq3kq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaauek3h2uqdqahflx6g3apxusjlzt7ua25cqghozphzh7i2dusq3kq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-19T14:49:12.037Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wk2pxbuc.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"wk2pxbuc.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaq7cjdgp4hoyele7moedifhbjsqaotgj4o42odixak65jjrgwazdq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaq7cjdgp4hoyele7moedifhbjsqaotgj4o42odixak65jjrgwazdq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-19T14:49:05.480Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wk2pxbuc.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"wk2pxbuc.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaak6gzud5ltiwv3old5agds2wuv7eqt5svgdmbtkxk74qlealwejda\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaak6gzud5ltiwv3old5agds2wuv7eqt5svgdmbtkxk74qlealwejda\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-19T14:48:59.319Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wk2pxbuc.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"wk2pxbuc.ocidefault2.ocidbqavnetjun.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaabzfydudmyqnvw5offmehljthoizfv4coslfxvn6rhm2c7dplxc5a\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaabzfydudmyqnvw5offmehljthoizfv4coslfxvn6rhm2c7dplxc5a\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-19T14:48:52.579Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"wk2pxbuc.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaayn3cs33kkv2ea3mju56ppxeykhxouxecpgduyvwhht64gzues24a\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaayn3cs33kkv2ea3mju56ppxeykhxouxecpgduyvwhht64gzues24a\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-19T14:48:46.414Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/wk2pxbuc.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"wk2pxbuc.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaojbkm3zq4qcvaxjw6ygrbeplyoi6qc3x2epnnyfllhnuqvwnrwca\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaojbkm3zq4qcvaxjw6ygrbeplyoi6qc3x2epnnyfllhnuqvwnrwca\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-19T14:48:39.175Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidefault2.ocidbqavnetjun.oraclevcn.com\",\"name\":\"ocidefault2.ocidbqavnetjun.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa5gutueusr6jpchyetry7rmpwzuolzyeg5brupv4suhjdxmwyju3q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa5gutueusr6jpchyetry7rmpwzuolzyeg5brupv4suhjdxmwyju3q\",\"serial\":52,\"version\":\"52\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaao3gw7b3xroaixkhbhjq5eoppwc243vd3hl66wjkiizpohtiylrta\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-19T14:38:19.654Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidg2.ocicomichaevn.oraclevcn.com\",\"name\":\"ocidg2.ocicomichaevn.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaayfrbngzzurv3635ufpelhizxy6ova2zj6aw6xdqubg4jk5mhhka\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaayfrbngzzurv3635ufpelhizxy6ova2zj6aw6xdqubg4jk5mhhka\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaawwky4j2igeyhsiiymg4ck3asdtbdtodasiwmix5gpmtz6tdsk2sa\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-06T18:29:41.606Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/hhbrpiy9.ocidefault.ocidrtestvnet0.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"hhbrpiy9.ocidefault.ocidrtestvnet0.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaruijtrfudlcuntanf77nvyiirr5n337nnv6y34l4cvmnnma3mtta\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaruijtrfudlcuntanf77nvyiirr5n337nnv6y34l4cvmnnma3mtta\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-06T14:27:35.396Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/hhbrpiy9.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"hhbrpiy9.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaasmeh5nyfrvruvklbomkbur4ox5345ay4g3skczkfb6xlt7aas6ma\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaasmeh5nyfrvruvklbomkbur4ox5345ay4g3skczkfb6xlt7aas6ma\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-06T14:27:28.931Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/hhbrpiy9.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"hhbrpiy9.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaab4owiz2wmj7ulq2uxsqajx3kqq3rb6c3i2ceq53i6mashm2alzla\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaab4owiz2wmj7ulq2uxsqajx3kqq3rb6c3i2ceq53i6mashm2alzla\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-06T14:27:22.651Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/hhbrpiy9.ocidefault.ocidrtestvnet0.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"hhbrpiy9.ocidefault.ocidrtestvnet0.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaac6rszht6ij5vrhyahso37572dm7t7xgswqpzduussvzsmgms2wva\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaac6rszht6ij5vrhyahso37572dm7t7xgswqpzduussvzsmgms2wva\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-06T14:27:15.799Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"hhbrpiy9.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaooge7wkwf7aulz64rzy7pceoel7mogqn4cuyldhvkyxaybifi2uq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaooge7wkwf7aulz64rzy7pceoel7mogqn4cuyldhvkyxaybifi2uq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-06T14:27:09.210Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/hhbrpiy9.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"hhbrpiy9.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa6odjwvdsas2w7inxrdgzcdyvxxxdsv3o7fhyh5wpjimivp4tn2ga\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa6odjwvdsas2w7inxrdgzcdyvxxxdsv3o7fhyh5wpjimivp4tn2ga\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-06T14:27:02.468Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/spalimpa.testPZ.com\",\"name\":\"spalimpa.testPZ.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaeklkqm7qhkj2rhhgphy3eukkoilfdgz4m3ukguqc74ok4hbncpjq\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaeklkqm7qhkj2rhhgphy3eukkoilfdgz4m3ukguqc74ok4hbncpjq\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqavprecsjhqzozhzhubrv5zh2zkc7rbzebv5htjaowyhpq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-03T22:05:54.212Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/max.test.zone.oracle.com\",\"name\":\"max.test.zone.oracle.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa7ygbhn7emc4o5bjabgll2zma6wlbruelhqs7vop3g3vvenqzaara\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa7ygbhn7emc4o5bjabgll2zma6wlbruelhqs7vop3g3vvenqzaara\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqahnekoidsqbfml7bpjcujxtreo24uesvwahbixqcvrdwa\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-03T16:45:05.632Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/max.test.oracle.com\",\"name\":\"max.test.oracle.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaabhqszhsgh6uvcvzk6krlothr3z4sss7r5ofxphtv4vlljdrygq7a\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaabhqszhsgh6uvcvzk6krlothr3z4sss7r5ofxphtv4vlljdrygq7a\",\"serial\":1,\"version\":\"1\",\"viewId\":\"ocid1.dnsview.oc1.iad.amaaaaaanirvylqahnekoidsqbfml7bpjcujxtreo24uesvwahbixqcvrdwa\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-03T16:44:53.446Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/dfadf.adfdf.sdfd.dadf.dfadf.com\",\"name\":\"dfadf.adfdf.sdfd.dadf.dfadf.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaa2jkbhl574i7vnhcp4ax32j5jmaa3ut5d4bydigzbqkcqo4omyha\",\"isProtected\":false,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaa2jkbhl574i7vnhcp4ax32j5jmaa3ut5d4bydigzbqkcqo4omyha\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaahjczll6evlberotb4inm7yihkpj2nzie3zcicxidot3wucc634eq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-06-03T16:39:34.815Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/rctjwxmm.ocisyde2etests.ocisyde2etestv.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"rctjwxmm.ocisyde2etests.ocisyde2etestv.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaarse5exi5zzcgehmszex7h4ycr4s7efhlyc7wg5wv6labuqiqzcba\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaarse5exi5zzcgehmszex7h4ycr4s7efhlyc7wg5wv6labuqiqzcba\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-30T20:57:17.067Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/rctjwxmm.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"rctjwxmm.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa7i4sys74x7xnyoupqo2i6zdu3si3arj73lihp6tai7dvgxg4w32q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa7i4sys74x7xnyoupqo2i6zdu3si3arj73lihp6tai7dvgxg4w32q\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-30T20:57:07.022Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/rctjwxmm.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"rctjwxmm.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaaunmixtw3khbebl4dnmg33yn4aq3pdh4nrad7hmcwygltfbtokw6a\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaaunmixtw3khbebl4dnmg33yn4aq3pdh4nrad7hmcwygltfbtokw6a\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-30T20:56:58.792Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/rctjwxmm.ocisyde2etests.ocisyde2etestv.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"rctjwxmm.ocisyde2etests.ocisyde2etestv.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa3ozioggqqca4zwjk3pmljb7doim4gxt4yma64b6gcilpj34duseq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa3ozioggqqca4zwjk3pmljb7doim4gxt4yma64b6gcilpj34duseq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-30T20:56:50.603Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"rctjwxmm.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaa43a7t67dzqj5r4egpmlitkmko6saotl6i632rpbrpoxxopbs2jba\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaa43a7t67dzqj5r4egpmlitkmko6saotl6i632rpbrpoxxopbs2jba\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-30T20:56:42.640Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/rctjwxmm.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"rctjwxmm.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaatk2fltmmfkhqgpohzuotxi5nbzqz27dgtsf223lfe4acjvwgjm7q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaatk2fltmmfkhqgpohzuotxi5nbzqz27dgtsf223lfe4acjvwgjm7q\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-30T20:56:35.877Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocisyde2etests.ocisyde2etestv.oraclevcn.com\",\"name\":\"ocisyde2etests.ocisyde2etestv.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaabdurgqory2p4a2g72vp2w5pa2niq4e27qgk5qanqwrn7psiyoaxa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaabdurgqory2p4a2g72vp2w5pa2niq4e27qgk5qanqwrn7psiyoaxa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa6ewmoocgnxx526ixpfx6vtkf6rn247zkfdrsfyvesicigspdkona\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-30T20:47:17.829Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidelegated.ocisysvereastu.oraclevcn.com\",\"name\":\"ocidelegated.ocisysvereastu.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaajob3b7ggbhzcwxmof3nb6ylktgh5wuiatera6uwqywosb4uju2mq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaajob3b7ggbhzcwxmof3nb6ylktgh5wuiatera6uwqywosb4uju2mq\",\"serial\":3,\"version\":\"3\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaae42p4btkcvdoe7q44zq5og6wvw7bpse2mpkiancqpdvtjf6zibtq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-23T15:02:12.393Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ypieowfk.ocidefault.ocidrtestvnet0.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"ypieowfk.ocidefault.ocidrtestvnet0.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaai5ewmcufwnawqq3yqgshucaj7nwj2gjt5rwhsjhqlazabse7wjkq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaai5ewmcufwnawqq3yqgshucaj7nwj2gjt5rwhsjhqlazabse7wjkq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-16T06:21:31.658Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ypieowfk.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"ypieowfk.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaav3yao3xacdrdwk4f5ydlssxzufax2cb3gdn4gxm3eqhc7ei4rm7q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaav3yao3xacdrdwk4f5ydlssxzufax2cb3gdn4gxm3eqhc7ei4rm7q\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-16T06:21:24.889Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ypieowfk.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"ypieowfk.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaato5d4z77h7h4w3ycjclzipd3jwbqhs25fmgszouxel7shwiecywq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaato5d4z77h7h4w3ycjclzipd3jwbqhs25fmgszouxel7shwiecywq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-16T06:21:17.956Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ypieowfk.ocidefault.ocidrtestvnet0.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"ypieowfk.ocidefault.ocidrtestvnet0.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaadcynsj7blvl42xih2ri7dzjicd3cfxmyc4bhvnps2ztpsypmps7a\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaadcynsj7blvl42xih2ri7dzjicd3cfxmyc4bhvnps2ztpsypmps7a\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-16T06:21:11.096Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ypieowfk.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"ypieowfk.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaamuoacfpo76jn2fxejetma3bja4x5g46iubrfqnycerkst5334bha\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaamuoacfpo76jn2fxejetma3bja4x5g46iubrfqnycerkst5334bha\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-16T06:21:04.428Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ypieowfk.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"ypieowfk.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaawhehbrcfkpahuwak3uz56t3ioqfow76akav5e42yoshubqez3eoq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaawhehbrcfkpahuwak3uz56t3ioqfow76akav5e42yoshubqez3eoq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-16T06:20:58.082Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidelegated.ociperfttestvn.oraclevcn.com\",\"name\":\"ocidelegated.ociperfttestvn.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaadppgz7znr5imgcitihsgjqhziygwbs2csiznjtuebq6hriccepzq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaadppgz7znr5imgcitihsgjqhziygwbs2csiznjtuebq6hriccepzq\",\"serial\":4,\"version\":\"4\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaboxvqwa65555p7u4g3yr55kamhj5hzd676w53c4xrokwfvdh25sq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-02T19:08:10.441Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/jfz7y85f.ocidefault.ocidrtestvnet0.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"jfz7y85f.ocidefault.ocidrtestvnet0.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaampdgm5uzq6shypefsbl5w2m4wdxrik5z6xeofeeu7vpaefgtwxfa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaampdgm5uzq6shypefsbl5w2m4wdxrik5z6xeofeeu7vpaefgtwxfa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-02T06:21:19.477Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/jfz7y85f.adb.us-ashburn-1.oraclevcn.com\",\"name\":\"jfz7y85f.adb.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaamshhtgqc7p3lzfgnqvkm7chm42cwt4ojiejwpsnrwvuj4e4s2nta\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaamshhtgqc7p3lzfgnqvkm7chm42cwt4ojiejwpsnrwvuj4e4s2nta\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-02T06:21:06.375Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/jfz7y85f.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"jfz7y85f.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaax3lnnwenzmztet5botjnori7mvgsz7tq7s74q3g6yfmiij4w4aqa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaax3lnnwenzmztet5botjnori7mvgsz7tq7s74q3g6yfmiij4w4aqa\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-02T06:20:51.731Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/jfz7y85f.ocidefault.ocidrtestvnet0.adbapps.us-ashburn-1.oraclevcn.com\",\"name\":\"jfz7y85f.ocidefault.ocidrtestvnet0.adbapps.us-ashburn-1.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaacmpsbictq3t7ncmwqnrdm3h3dsbn6rwevelizggwvqddudk4vvuq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaacmpsbictq3t7ncmwqnrdm3h3dsbn6rwevelizggwvqddudk4vvuq\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-02T06:20:14.419Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com\",\"name\":\"jfz7y85f.adb.us-ashburn-1.oraclecloudapps.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaake4ehdmtu5vhtlxobojcydldjtscmdvdtk22tr6g7neneantpuka\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaake4ehdmtu5vhtlxobojcydldjtscmdvdtk22tr6g7neneantpuka\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-02T06:20:01.718Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/jfz7y85f.adb.us-ashburn-1.oraclecloud.com\",\"name\":\"jfz7y85f.adb.us-ashburn-1.oraclecloud.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaansejlawskpmnbb63vr7ccmziuksqzrnkpvc664ycuq4osunhki3q\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaansejlawskpmnbb63vr7ccmziuksqzrnkpvc664ycuq4osunhki3q\",\"serial\":2,\"version\":\"2\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-02T06:19:43.462Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocisubnetaccte.ocivnetacctest.oraclevcn.com\",\"name\":\"ocisubnetaccte.ocivnetacctest.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaavzpipf473ar2ikpurygj674vuy2nve5zy7u7vf55wtc77oibqlbq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaavzpipf473ar2ikpurygj674vuy2nve5zy7u7vf55wtc77oibqlbq\",\"serial\":3,\"version\":\"3\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaainzhp3afn4raviq24b6x3hkzzokn2cpqthig7iat2uh3zya72o2a\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-05-01T15:47:32.650Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidefault.ocidrtestvnet0.oraclevcn.com\",\"name\":\"ocidefault.ocidrtestvnet0.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaazun56niejhwovlxzxhi7bodroxjergt752aujda6rjlvofah6ufa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaazun56niejhwovlxzxhi7bodroxjergt752aujda6rjlvofah6ufa\",\"serial\":39,\"version\":\"39\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaaomz3aoqsp6fjzw2uxo4zen7jw3u4svpwjptufokhl5ptugyp7tra\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-04-17T12:07:28.632Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidelegatedsu.ocidbqaociuivn.oraclevcn.com\",\"name\":\"ocidelegatedsu.ocidbqaociuivn.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaam3huoxdz6zoad7x6mimtprsgxzt6mfvlodsfhoxz4n35s47ytmbq\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaam3huoxdz6zoad7x6mimtprsgxzt6mfvlodsfhoxz4n35s47ytmbq\",\"serial\":32,\"version\":\"32\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaatle4wjrmfronppo5rlezom7k73ghwobdfpzkyxtg6bzguq4hwsbq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-04-05T10:05:02.836Z\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dnsPrivateZones/ocidelegated.ocidnsfwdvn.oraclevcn.com\",\"name\":\"ocidelegated.ocidnsfwdvn.oraclevcn.com\",\"type\":\"Oracle.Database/Locations/dnsPrivateZones\",\"properties\":{\"ocid\":\"ocid1.dns-zone.oc1.iad.aaaaaaaau67ic5wbuuefyidvq2bx6tuympvine2opewjijhx5pou4fo27sfa\",\"isProtected\":true,\"provisioningState\":\"Active\",\"lifecycleState\":null,\"self\":\"https://dns.us-ashburn-1.oci.oraclecloud.com/20180115/zones/ocid1.dns-zone.oc1.iad.aaaaaaaau67ic5wbuuefyidvq2bx6tuympvine2opewjijhx5pou4fo27sfa\",\"serial\":4,\"version\":\"4\",\"viewId\":\"ocid1.dnsview.oc1.iad.aaaaaaaa5pegcnpgikfbbmnswt6wg3wpxakvowirvkpqz5lskkkydy3sjglq\",\"zoneType\":\"Primary\",\"timeCreated\":\"2024-03-05T21:15:02.783Z\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Tests.ps1 new file mode 100644 index 000000000000..cd9aeaa21367 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleDnsPrivateZone.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDnsPrivateZone')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDnsPrivateZone.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDnsPrivateZone' { + It 'List' { + { + $dnsPrivateZoneList = Get-AzOracleDnsPrivateZone -Location $env.location + $dnsPrivateZoneList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Recording.json b/src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Recording.json new file mode 100644 index 000000000000..68143f614183 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Recording.json @@ -0,0 +1,47 @@ +{ + "Get-AzOracleGiVersion+[NoContext]+List+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/giVersions?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/giVersions?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "9dfa029b-363a-41a1-b130-d2b20974f8dc" ], + "CommandName": [ "Get-AzOracleGiVersion" ], + "FullCommandName": [ "Get-AzOracleGiVersion_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/723CF61EAC5A257A13F1DED61BD83AD6/0041FDDDBD49384809DEEDF0C1443E44" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "1e23a33e-dbaf-472c-8b1d-a4e49e9436bc" ], + "x-ms-correlation-request-id": [ "b0553126-a881-47d8-adfc-88d4c4c4e1cd" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKWEST:20240705T101019Z:b0553126-a881-47d8-adfc-88d4c4c4e1cd" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 89934651365445DB856FB0DCB4E3ED81 Ref B: AMS231032607031 Ref C: 2024-07-05T10:10:17Z" ], + "Date": [ "Fri, 05 Jul 2024 10:10:19 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "459" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/giVersions/19.0.0.0\",\"name\":\"19.0.0.0\",\"type\":\"Oracle.Database/Locations/giVersions\",\"properties\":{\"version\":\"19.0.0.0\"}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/giVersions/23.0.0.0\",\"name\":\"23.0.0.0\",\"type\":\"Oracle.Database/Locations/giVersions\",\"properties\":{\"version\":\"23.0.0.0\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Tests.ps1 new file mode 100644 index 000000000000..045b1d361597 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Get-AzOracleGiVersion.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleGiVersion')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleGiVersion.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleGiVersion' { + It 'List' { + { + $giVersionList = Get-AzOracleGiVersion -Location $env.location + $giVersionList.Count | Should -BeGreaterThan 0 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleActionDbNode.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleActionDbNode.Tests.ps1 new file mode 100644 index 000000000000..aaaaf08bd245 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleActionDbNode.Tests.ps1 @@ -0,0 +1,37 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzOracleActionDbNode')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzOracleActionDbNode.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzOracleActionDbNode' { + It 'ActionExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaIdentityCloudVMClusterExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Recording.json b/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Recording.json new file mode 100644 index 000000000000..b61195942eac --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Recording.json @@ -0,0 +1,914 @@ +{ + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$POST+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/switchover?api-version=2023-09-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/switchover?api-version=2023-09-01", + "Content": "{\n \"peerDbId\": \"testId12345\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "31" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562910746042000\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=CrkSozBeef2w860sF-Haj6a6zTyxLsB1XBCDRtkJj1azBNyqWKP-1C36A313dVjpV6shST_mm1ySOL-DyJ-H7w0sijmdUPxvrcWhLLleSAxTbZDQjmV3bUWU-zHGLjnDse5fXnMYIe2Iv8eSFPJuKzbfL1htuuLBujjeQdIu8WNL_gDHWTuuEuIFXBmVSKpelts9UtgXoBajaql1-4VuoQ0yAcY2OwNx8txVHT_CzKlicCF9KzetRsIpBxup-PebthmSZ-_PxdsxvJgZC715dAq_sRZgJfNMAKOeuwvkqwqrtGfSKhneZZPHlQZnLNXaZeX-Ix5IopLZxk1jdmVgNQ\u0026h=xnVaS92EcZcx6CAOic02lrk5Vg4d1An9AGeCXbUAMrU" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/2A8463B4FE27FD3D3B6B00E643838307/4D2F6CCB362EB01AEE3B89E39BD18B42" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562910746042000\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=CrkSozBeef2w860sF-Haj6a6zTyxLsB1XBCDRtkJj1azBNyqWKP-1C36A313dVjpV6shST_mm1ySOL-DyJ-H7w0sijmdUPxvrcWhLLleSAxTbZDQjmV3bUWU-zHGLjnDse5fXnMYIe2Iv8eSFPJuKzbfL1htuuLBujjeQdIu8WNL_gDHWTuuEuIFXBmVSKpelts9UtgXoBajaql1-4VuoQ0yAcY2OwNx8txVHT_CzKlicCF9KzetRsIpBxup-PebthmSZ-_PxdsxvJgZC715dAq_sRZgJfNMAKOeuwvkqwqrtGfSKhneZZPHlQZnLNXaZeX-Ix5IopLZxk1jdmVgNQ\u0026h=xnVaS92EcZcx6CAOic02lrk5Vg4d1An9AGeCXbUAMrU" ], + "x-ms-request-id": [ "9587f041-217c-4a4f-9655-c94d1766cebf" ], + "x-ms-correlation-request-id": [ "cce937b0-0288-4b69-b745-6b2ddda00745" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T103754Z:cce937b0-0288-4b69-b745-6b2ddda00745" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: D2675C3F82E34B7E9994E5BB5944090C Ref B: AMS231032609017 Ref C: 2024-07-11T10:37:51Z" ], + "Date": [ "Thu, 11 Jul 2024 10:37:54 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "8891" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.0033287405967712402,\"allocatedStorageSizeInTbs\":0.0078125,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{\"HIGH\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"MEDIUM\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"LOW\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"TPURGENT\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com\",\"TP\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com\"},\"dedicated\":null,\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"mongoDbUrl\":null,\"ordsUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":32,\"dataStorageSizeInTbs\":null,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"inMemoryAreaInGbs\":null,\"nextLongTermBackupTimeStamp\":null,\"longTermBackupSchedule\":null,\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lagTimeInSeconds\":null,\"lifecycleState\":\"Standby\",\"lifecycleDetails\":null,\"timeDataGuardRoleChanged\":null,\"timeDisasterRecoveryRoleChanged\":null},\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"BringYourOwnLicense\",\"lifecycleDetails\":null,\"provisioningState\":null,\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":\"ReadWrite\",\"operationsInsightsStatus\":null,\"permissionLevel\":null,\"privateEndpoint\":\"zsz2zdb9.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.227\",\"privateEndpointLabel\":\"zsz2zdb9\",\"provisionableCpus\":null,\"lifecycleState\":\"Available\",\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":null,\"supportedRegionsToCloneTo\":null,\"timeCreated\":\"2024-07-11T09:43:59.196Z\",\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":\"Thu Jul 11 09:44:23 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-14T20:00:00.000Z\",\"timeMaintenanceEnd\":\"2024-07-14T22:00:00.000Z\",\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":null,\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":null,\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaawhqnicickxllrvrtu4m4bzc7q5vewtvyfg55u4rlxha\",\"backupRetentionPeriodInDays\":60},\"location\":null,\"tags\":null,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"type\":\"Oracle.Database/autonomousDatabases\",\"name\":\"OFakePowerShellTestAdbs\",\"systemData\":null}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562910746042000\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=CrkSozBeef2w860sF-Haj6a6zTyxLsB1XBCDRtkJj1azBNyqWKP-1C36A313dVjpV6shST_mm1ySOL-DyJ-H7w0sijmdUPxvrcWhLLleSAxTbZDQjmV3bUWU-zHGLjnDse5fXnMYIe2Iv8eSFPJuKzbfL1htuuLBujjeQdIu8WNL_gDHWTuuEuIFXBmVSKpelts9UtgXoBajaql1-4VuoQ0yAcY2OwNx8txVHT_CzKlicCF9KzetRsIpBxup-PebthmSZ-_PxdsxvJgZC715dAq_sRZgJfNMAKOeuwvkqwqrtGfSKhneZZPHlQZnLNXaZeX-Ix5IopLZxk1jdmVgNQ\u0026h=xnVaS92EcZcx6CAOic02lrk5Vg4d1An9AGeCXbUAMrU+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562910746042000\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=CrkSozBeef2w860sF-Haj6a6zTyxLsB1XBCDRtkJj1azBNyqWKP-1C36A313dVjpV6shST_mm1ySOL-DyJ-H7w0sijmdUPxvrcWhLLleSAxTbZDQjmV3bUWU-zHGLjnDse5fXnMYIe2Iv8eSFPJuKzbfL1htuuLBujjeQdIu8WNL_gDHWTuuEuIFXBmVSKpelts9UtgXoBajaql1-4VuoQ0yAcY2OwNx8txVHT_CzKlicCF9KzetRsIpBxup-PebthmSZ-_PxdsxvJgZC715dAq_sRZgJfNMAKOeuwvkqwqrtGfSKhneZZPHlQZnLNXaZeX-Ix5IopLZxk1jdmVgNQ\u0026h=xnVaS92EcZcx6CAOic02lrk5Vg4d1An9AGeCXbUAMrU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2007179-0000-0100-0000-668fb61e0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911053244186\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=ch0AT2N_6TedCXLORMQIXWkY1nT69Q8mayv4xk9HBaj_f87epRmxZzp0UiXseIYv69qEL6utHjzfT2CN-abfVg6FBOmZ2xUEHSUYUghakC0VgAgjaArbQ6UKSOkpsSVbavOeQPQEtbtKOeOrGiuaGvzCYMBsnR8cG-FsWezkNQ5oJ2tvPGKTboB9Tjvx1x_q41GdhdQH4UAQuXzALv7iBd0TIKzVmX5jcrErnyYcYvhZcUtRV-YxnxiwGTtqcVbTjMQbZ1p5BFJgkXxpYNWqvz0tiFgTmYb8eAjy7Q6n6jQJENznogBrnbc8j7rhtvyVJd8qELSBCKyM5KlIwxpRWg\u0026h=GH4d6UpYfqbXCQsLOk3DHflUz6dY35SeaHaqGyNiZE8" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911053088539\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=gvgeAdnpl-iWALPjLaKCUQMwR-HqMpoXO5iwS7-7ncrz6pBc3iq8pQnM4kV3AyDjBW9ftqbou-_KYK2lKMH8eoi43Ga6uoBgbbDjPPpRAEV84VPtSgaYam22CPXOhsSNLFBX04DrQHxfLL5vf7ohGr3uM7T1CKO8NqzOn6_8FXLRFW-n2rmxRdcK-1dKQIVuGfKCGux5_gOMpWFWZvkCuhKNxIQJawjjZrq_HyBT0lUDEf77K07YuyvSFD7wGQjeMaNtrixHJ4GYAx2EpU3Z9HNk8wjKjKQ5BiqaaVYu7PyAz-RooH5dpt3cSoxQs2uhAe7wH4ATO0-RhE6svaRl_Q\u0026h=JLmHqjAq4LKLK08U9GRZOeJ_f3IfzSpfzPzDvkPPAyI" ], + "x-ms-request-id": [ "60993097-c2a7-4136-80ec-429a5eeb18c9" ], + "x-ms-correlation-request-id": [ "69e18a05-fafc-4641-9978-0856f261fd8c" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T103825Z:69e18a05-fafc-4641-9978-0856f261fd8c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 60D02234D71E413DBC147274D87ACF6D Ref B: AMS231032609017 Ref C: 2024-07-11T10:38:25Z" ], + "Date": [ "Thu, 11 Jul 2024 10:38:25 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "626" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:38:22.077Z\",\"percentComplete\":10.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911053088539\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=gvgeAdnpl-iWALPjLaKCUQMwR-HqMpoXO5iwS7-7ncrz6pBc3iq8pQnM4kV3AyDjBW9ftqbou-_KYK2lKMH8eoi43Ga6uoBgbbDjPPpRAEV84VPtSgaYam22CPXOhsSNLFBX04DrQHxfLL5vf7ohGr3uM7T1CKO8NqzOn6_8FXLRFW-n2rmxRdcK-1dKQIVuGfKCGux5_gOMpWFWZvkCuhKNxIQJawjjZrq_HyBT0lUDEf77K07YuyvSFD7wGQjeMaNtrixHJ4GYAx2EpU3Z9HNk8wjKjKQ5BiqaaVYu7PyAz-RooH5dpt3cSoxQs2uhAe7wH4ATO0-RhE6svaRl_Q\u0026h=JLmHqjAq4LKLK08U9GRZOeJ_f3IfzSpfzPzDvkPPAyI+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911053088539\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=gvgeAdnpl-iWALPjLaKCUQMwR-HqMpoXO5iwS7-7ncrz6pBc3iq8pQnM4kV3AyDjBW9ftqbou-_KYK2lKMH8eoi43Ga6uoBgbbDjPPpRAEV84VPtSgaYam22CPXOhsSNLFBX04DrQHxfLL5vf7ohGr3uM7T1CKO8NqzOn6_8FXLRFW-n2rmxRdcK-1dKQIVuGfKCGux5_gOMpWFWZvkCuhKNxIQJawjjZrq_HyBT0lUDEf77K07YuyvSFD7wGQjeMaNtrixHJ4GYAx2EpU3Z9HNk8wjKjKQ5BiqaaVYu7PyAz-RooH5dpt3cSoxQs2uhAe7wH4ATO0-RhE6svaRl_Q\u0026h=JLmHqjAq4LKLK08U9GRZOeJ_f3IfzSpfzPzDvkPPAyI", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2001f7a-0000-0100-0000-668fb63e0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911360275079\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=LGJ8_v6T9tNREEwJwnYo_j-Wpwx-F0h7a3RQXefX2b90nzmiP1MXt4HM16Ul8o0IYWxFqR3NPA7nkMYDAWgsTTMV6uX0hxzV_Ms0EYfckG2NSG9gYwz6ZuuvOf15Y3uH5Sqjej63m1oqBQYQEeIMDWRVF6zU5zzDLPVsNq6cHOyYmo1zi7rL-GnILAermGp6cH7HJLCFKPEZUSFyA0fsf4r8IJeRGqVOTkM7GRM_tbHRND0Rw0yXwK2CY60XAYrOMnubKStJgOWujCL5M9U4mNqrU5f38GQb70aDglNgBpHw9C1BvfZUS8Y40dSHz45tCa0ymfkz-VSMOVFqXSKIOQ\u0026h=tgDDPFtrez4GZ-0VRw3Z1NtwpBkoPY4qDdISG_VOftw" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911360275079\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=LGJ8_v6T9tNREEwJwnYo_j-Wpwx-F0h7a3RQXefX2b90nzmiP1MXt4HM16Ul8o0IYWxFqR3NPA7nkMYDAWgsTTMV6uX0hxzV_Ms0EYfckG2NSG9gYwz6ZuuvOf15Y3uH5Sqjej63m1oqBQYQEeIMDWRVF6zU5zzDLPVsNq6cHOyYmo1zi7rL-GnILAermGp6cH7HJLCFKPEZUSFyA0fsf4r8IJeRGqVOTkM7GRM_tbHRND0Rw0yXwK2CY60XAYrOMnubKStJgOWujCL5M9U4mNqrU5f38GQb70aDglNgBpHw9C1BvfZUS8Y40dSHz45tCa0ymfkz-VSMOVFqXSKIOQ\u0026h=tgDDPFtrez4GZ-0VRw3Z1NtwpBkoPY4qDdISG_VOftw" ], + "x-ms-request-id": [ "5e59b38b-a7ad-4d6a-8e8b-97198227a6be" ], + "x-ms-correlation-request-id": [ "bfd9ceae-4bd2-4dd1-a010-35b8707471ea" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T103856Z:bfd9ceae-4bd2-4dd1-a010-35b8707471ea" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: FDB4D2ED3F844E07BF6887EA8ADACB2E Ref B: AMS231032609017 Ref C: 2024-07-11T10:38:55Z" ], + "Date": [ "Thu, 11 Jul 2024 10:38:55 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "626" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:38:54.295Z\",\"percentComplete\":64.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911360275079\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=LGJ8_v6T9tNREEwJwnYo_j-Wpwx-F0h7a3RQXefX2b90nzmiP1MXt4HM16Ul8o0IYWxFqR3NPA7nkMYDAWgsTTMV6uX0hxzV_Ms0EYfckG2NSG9gYwz6ZuuvOf15Y3uH5Sqjej63m1oqBQYQEeIMDWRVF6zU5zzDLPVsNq6cHOyYmo1zi7rL-GnILAermGp6cH7HJLCFKPEZUSFyA0fsf4r8IJeRGqVOTkM7GRM_tbHRND0Rw0yXwK2CY60XAYrOMnubKStJgOWujCL5M9U4mNqrU5f38GQb70aDglNgBpHw9C1BvfZUS8Y40dSHz45tCa0ymfkz-VSMOVFqXSKIOQ\u0026h=tgDDPFtrez4GZ-0VRw3Z1NtwpBkoPY4qDdISG_VOftw+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911360275079\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=LGJ8_v6T9tNREEwJwnYo_j-Wpwx-F0h7a3RQXefX2b90nzmiP1MXt4HM16Ul8o0IYWxFqR3NPA7nkMYDAWgsTTMV6uX0hxzV_Ms0EYfckG2NSG9gYwz6ZuuvOf15Y3uH5Sqjej63m1oqBQYQEeIMDWRVF6zU5zzDLPVsNq6cHOyYmo1zi7rL-GnILAermGp6cH7HJLCFKPEZUSFyA0fsf4r8IJeRGqVOTkM7GRM_tbHRND0Rw0yXwK2CY60XAYrOMnubKStJgOWujCL5M9U4mNqrU5f38GQb70aDglNgBpHw9C1BvfZUS8Y40dSHz45tCa0ymfkz-VSMOVFqXSKIOQ\u0026h=tgDDPFtrez4GZ-0VRw3Z1NtwpBkoPY4qDdISG_VOftw", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200cd7a-0000-0100-0000-668fb6590000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911665968438\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=HOzp9aGwOWG5v0IYnlXJHI5Ig_PHeze59RVhu4Yt-aQqkzr6EQfGdeRbREldQpQP0vVbv_LaLNwjW_YdOnGNWZfuA7J4jMYMlgAiCfkKyR27nNe04tVomYO9oaUCrJ58kQVD3A8SW6qI01MQou1vBkFMfOwY8mlTtwAeoIyevkoT_Lv_EP_fhDPMnVKJnv3taLYvYvCym2eE0FPMrINmKXpS-HX_hiuqI0OUO2Yl_1FSD47fpYCfvUZwwUUs4r9X-zPgta0-b92EqVE-4kKqO-YSEIAwdVp0qrZ4NpBiHasECdzCfoAHFsomx3ETkk3Hhe3xAG087nLump6wNilcHQ\u0026h=F8T3cn3QYhAf1hso0-TA_fJIuEslvykNo0VwYuN9w10" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911665968438\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=HOzp9aGwOWG5v0IYnlXJHI5Ig_PHeze59RVhu4Yt-aQqkzr6EQfGdeRbREldQpQP0vVbv_LaLNwjW_YdOnGNWZfuA7J4jMYMlgAiCfkKyR27nNe04tVomYO9oaUCrJ58kQVD3A8SW6qI01MQou1vBkFMfOwY8mlTtwAeoIyevkoT_Lv_EP_fhDPMnVKJnv3taLYvYvCym2eE0FPMrINmKXpS-HX_hiuqI0OUO2Yl_1FSD47fpYCfvUZwwUUs4r9X-zPgta0-b92EqVE-4kKqO-YSEIAwdVp0qrZ4NpBiHasECdzCfoAHFsomx3ETkk3Hhe3xAG087nLump6wNilcHQ\u0026h=F8T3cn3QYhAf1hso0-TA_fJIuEslvykNo0VwYuN9w10" ], + "x-ms-request-id": [ "6dd8d799-5cdf-4d6a-a6c5-521bba1fbd4b" ], + "x-ms-correlation-request-id": [ "b3635a96-8810-4cb2-9dd9-c8e023e4f1a7" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T103926Z:b3635a96-8810-4cb2-9dd9-c8e023e4f1a7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1E283FF5B34E42DDB568B900E28B4458 Ref B: AMS231032609017 Ref C: 2024-07-11T10:39:26Z" ], + "Date": [ "Thu, 11 Jul 2024 10:39:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:39:21.047Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911665968438\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=HOzp9aGwOWG5v0IYnlXJHI5Ig_PHeze59RVhu4Yt-aQqkzr6EQfGdeRbREldQpQP0vVbv_LaLNwjW_YdOnGNWZfuA7J4jMYMlgAiCfkKyR27nNe04tVomYO9oaUCrJ58kQVD3A8SW6qI01MQou1vBkFMfOwY8mlTtwAeoIyevkoT_Lv_EP_fhDPMnVKJnv3taLYvYvCym2eE0FPMrINmKXpS-HX_hiuqI0OUO2Yl_1FSD47fpYCfvUZwwUUs4r9X-zPgta0-b92EqVE-4kKqO-YSEIAwdVp0qrZ4NpBiHasECdzCfoAHFsomx3ETkk3Hhe3xAG087nLump6wNilcHQ\u0026h=F8T3cn3QYhAf1hso0-TA_fJIuEslvykNo0VwYuN9w10+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911665968438\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=HOzp9aGwOWG5v0IYnlXJHI5Ig_PHeze59RVhu4Yt-aQqkzr6EQfGdeRbREldQpQP0vVbv_LaLNwjW_YdOnGNWZfuA7J4jMYMlgAiCfkKyR27nNe04tVomYO9oaUCrJ58kQVD3A8SW6qI01MQou1vBkFMfOwY8mlTtwAeoIyevkoT_Lv_EP_fhDPMnVKJnv3taLYvYvCym2eE0FPMrINmKXpS-HX_hiuqI0OUO2Yl_1FSD47fpYCfvUZwwUUs4r9X-zPgta0-b92EqVE-4kKqO-YSEIAwdVp0qrZ4NpBiHasECdzCfoAHFsomx3ETkk3Hhe3xAG087nLump6wNilcHQ\u0026h=F8T3cn3QYhAf1hso0-TA_fJIuEslvykNo0VwYuN9w10", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200857b-0000-0100-0000-668fb6770000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911971119004\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AJ9eM7Ik7dvK6ngtLrWFKE4VVjl9CyKDA-hNu-lzFxfDXwRouL3Pe6-K079lw7BJjOK05bUHW7gXzpzxxCw-n55hO3NogjYCtLuf7-6MX9qOyryywTK26IKeH0dBend0Eg3fam5A4puKezLIHnAWKy9r3yNEFFuMpU99DRbuFM_ZaAi7uxPZn76pfM2nbZzoo2ilD__BdYImwB_aNUInUJBmJ473poaaIzlp0plZQFHNwZ65BYkbiVAoMOtskw-j7lD2pMeEYQeCmfDWRkCYw-uiHI27ZkQwsawebF53S0nSpg6Iz4m-ED2HJAN1Jz45ifvj8p-i26Vc2I_TCjkV8Q\u0026h=Go_fQZfCpvN6-O5-pixU2gffrKehcjlRS_dzoadPzzw" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911971119004\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AJ9eM7Ik7dvK6ngtLrWFKE4VVjl9CyKDA-hNu-lzFxfDXwRouL3Pe6-K079lw7BJjOK05bUHW7gXzpzxxCw-n55hO3NogjYCtLuf7-6MX9qOyryywTK26IKeH0dBend0Eg3fam5A4puKezLIHnAWKy9r3yNEFFuMpU99DRbuFM_ZaAi7uxPZn76pfM2nbZzoo2ilD__BdYImwB_aNUInUJBmJ473poaaIzlp0plZQFHNwZ65BYkbiVAoMOtskw-j7lD2pMeEYQeCmfDWRkCYw-uiHI27ZkQwsawebF53S0nSpg6Iz4m-ED2HJAN1Jz45ifvj8p-i26Vc2I_TCjkV8Q\u0026h=Go_fQZfCpvN6-O5-pixU2gffrKehcjlRS_dzoadPzzw" ], + "x-ms-request-id": [ "a128c118-d382-4c31-ac2e-25b200209f82" ], + "x-ms-correlation-request-id": [ "0f621882-c5d7-45a6-ad4c-0596bc9d05b9" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T103957Z:0f621882-c5d7-45a6-ad4c-0596bc9d05b9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: CB4F6A0075FD447891EA89FEF5CCAE65 Ref B: AMS231032609017 Ref C: 2024-07-11T10:39:56Z" ], + "Date": [ "Thu, 11 Jul 2024 10:39:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:39:51.247Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911971119004\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AJ9eM7Ik7dvK6ngtLrWFKE4VVjl9CyKDA-hNu-lzFxfDXwRouL3Pe6-K079lw7BJjOK05bUHW7gXzpzxxCw-n55hO3NogjYCtLuf7-6MX9qOyryywTK26IKeH0dBend0Eg3fam5A4puKezLIHnAWKy9r3yNEFFuMpU99DRbuFM_ZaAi7uxPZn76pfM2nbZzoo2ilD__BdYImwB_aNUInUJBmJ473poaaIzlp0plZQFHNwZ65BYkbiVAoMOtskw-j7lD2pMeEYQeCmfDWRkCYw-uiHI27ZkQwsawebF53S0nSpg6Iz4m-ED2HJAN1Jz45ifvj8p-i26Vc2I_TCjkV8Q\u0026h=Go_fQZfCpvN6-O5-pixU2gffrKehcjlRS_dzoadPzzw+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562911971119004\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AJ9eM7Ik7dvK6ngtLrWFKE4VVjl9CyKDA-hNu-lzFxfDXwRouL3Pe6-K079lw7BJjOK05bUHW7gXzpzxxCw-n55hO3NogjYCtLuf7-6MX9qOyryywTK26IKeH0dBend0Eg3fam5A4puKezLIHnAWKy9r3yNEFFuMpU99DRbuFM_ZaAi7uxPZn76pfM2nbZzoo2ilD__BdYImwB_aNUInUJBmJ473poaaIzlp0plZQFHNwZ65BYkbiVAoMOtskw-j7lD2pMeEYQeCmfDWRkCYw-uiHI27ZkQwsawebF53S0nSpg6Iz4m-ED2HJAN1Jz45ifvj8p-i26Vc2I_TCjkV8Q\u0026h=Go_fQZfCpvN6-O5-pixU2gffrKehcjlRS_dzoadPzzw", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200237c-0000-0100-0000-668fb6920000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912275845078\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=SeE5QH7u_C1ipC9jWPz-EMrdYhHsqOVcR4ThofHgZURSezgeO28UcdpMvIM9ei8lCq0ixtgI1VfhY_aKyImIsKNqRaojU_BjoQbLRMszz7zc15PDiq9ANqwGPcO8V-fOi4Dc_TaGvX_5sz6oTzQR0hFrrn3JXjWJcsLMfIaLW7oipYQ3UTnurxh8iwSG04iS3j3WKlVTC6AVDFm9HMZuQUyv_kvvXETrgjEQ6ANXihmQbRQp6PrOQDW7KErYKIyrBcQz_k9LZKOlaG_DZE7aJhhJsv8N2gPN2uHdufWLfLsBtzlWOGSYBtORIT8Yr04ykB3PjQw3rtHnfvSGccu8Tw\u0026h=1Qf3cIxSmyMyxo7YvwMYBf08vwN2Rng_4r9ebOsN8Tc" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912275845078\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=SeE5QH7u_C1ipC9jWPz-EMrdYhHsqOVcR4ThofHgZURSezgeO28UcdpMvIM9ei8lCq0ixtgI1VfhY_aKyImIsKNqRaojU_BjoQbLRMszz7zc15PDiq9ANqwGPcO8V-fOi4Dc_TaGvX_5sz6oTzQR0hFrrn3JXjWJcsLMfIaLW7oipYQ3UTnurxh8iwSG04iS3j3WKlVTC6AVDFm9HMZuQUyv_kvvXETrgjEQ6ANXihmQbRQp6PrOQDW7KErYKIyrBcQz_k9LZKOlaG_DZE7aJhhJsv8N2gPN2uHdufWLfLsBtzlWOGSYBtORIT8Yr04ykB3PjQw3rtHnfvSGccu8Tw\u0026h=1Qf3cIxSmyMyxo7YvwMYBf08vwN2Rng_4r9ebOsN8Tc" ], + "x-ms-request-id": [ "fe5cb655-6e50-4b1c-afcb-480a583ee0e3" ], + "x-ms-correlation-request-id": [ "16ac8c37-e9f9-4acd-8bcb-7dd857b9ddcc" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104027Z:16ac8c37-e9f9-4acd-8bcb-7dd857b9ddcc" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 17AE4A2C885443169C16BF8E7C4A4704 Ref B: AMS231032609017 Ref C: 2024-07-11T10:40:27Z" ], + "Date": [ "Thu, 11 Jul 2024 10:40:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:40:18.521Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912275845078\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=SeE5QH7u_C1ipC9jWPz-EMrdYhHsqOVcR4ThofHgZURSezgeO28UcdpMvIM9ei8lCq0ixtgI1VfhY_aKyImIsKNqRaojU_BjoQbLRMszz7zc15PDiq9ANqwGPcO8V-fOi4Dc_TaGvX_5sz6oTzQR0hFrrn3JXjWJcsLMfIaLW7oipYQ3UTnurxh8iwSG04iS3j3WKlVTC6AVDFm9HMZuQUyv_kvvXETrgjEQ6ANXihmQbRQp6PrOQDW7KErYKIyrBcQz_k9LZKOlaG_DZE7aJhhJsv8N2gPN2uHdufWLfLsBtzlWOGSYBtORIT8Yr04ykB3PjQw3rtHnfvSGccu8Tw\u0026h=1Qf3cIxSmyMyxo7YvwMYBf08vwN2Rng_4r9ebOsN8Tc+7": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912275845078\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=SeE5QH7u_C1ipC9jWPz-EMrdYhHsqOVcR4ThofHgZURSezgeO28UcdpMvIM9ei8lCq0ixtgI1VfhY_aKyImIsKNqRaojU_BjoQbLRMszz7zc15PDiq9ANqwGPcO8V-fOi4Dc_TaGvX_5sz6oTzQR0hFrrn3JXjWJcsLMfIaLW7oipYQ3UTnurxh8iwSG04iS3j3WKlVTC6AVDFm9HMZuQUyv_kvvXETrgjEQ6ANXihmQbRQp6PrOQDW7KErYKIyrBcQz_k9LZKOlaG_DZE7aJhhJsv8N2gPN2uHdufWLfLsBtzlWOGSYBtORIT8Yr04ykB3PjQw3rtHnfvSGccu8Tw\u0026h=1Qf3cIxSmyMyxo7YvwMYBf08vwN2Rng_4r9ebOsN8Tc", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200a77c-0000-0100-0000-668fb6ac0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912580753337\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=K2iE0X3m8_F4lsJnENu2qvGQ2Vd7Gy4h06Sm3qJsVnPFf_GCNhsLsjlHmS1BrO0u6vzenJfHOZt997z5O4-JDAoY-stvlidbXaa2dQWFttMGvgz5vd3_tV8GSzi7SRUvK6ZXZ9di7FrhQAARbllJnhoVk0AgMEkKVrFoEgjJz_RUKN5gF39YwjJpgD7KZWz8y5wJpJ9Nact-VtxyBcESNNqXJ6ctm7pKbRbAo3JYxG6iULLU7rHxyMdB0Gk1Z2JSDtTOkCIkpxbU40aTJRNrgqK5YH9M5paFtnuHXNY2QXMnRxcl0kwh9UYm-aI1_DQ-an0VHbuVlm0WCzELdCu53w\u0026h=ukjFt_805Bx1vfmTQ1IFuseZsYmKDArN5fzecweePak" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912580753337\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=K2iE0X3m8_F4lsJnENu2qvGQ2Vd7Gy4h06Sm3qJsVnPFf_GCNhsLsjlHmS1BrO0u6vzenJfHOZt997z5O4-JDAoY-stvlidbXaa2dQWFttMGvgz5vd3_tV8GSzi7SRUvK6ZXZ9di7FrhQAARbllJnhoVk0AgMEkKVrFoEgjJz_RUKN5gF39YwjJpgD7KZWz8y5wJpJ9Nact-VtxyBcESNNqXJ6ctm7pKbRbAo3JYxG6iULLU7rHxyMdB0Gk1Z2JSDtTOkCIkpxbU40aTJRNrgqK5YH9M5paFtnuHXNY2QXMnRxcl0kwh9UYm-aI1_DQ-an0VHbuVlm0WCzELdCu53w\u0026h=ukjFt_805Bx1vfmTQ1IFuseZsYmKDArN5fzecweePak" ], + "x-ms-request-id": [ "8ba350ce-9ef9-4341-9716-380d602d68ff" ], + "x-ms-correlation-request-id": [ "79f41bda-5f17-4d9b-bc58-a70d394c8080" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104058Z:79f41bda-5f17-4d9b-bc58-a70d394c8080" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 589ACDE4F09B4847BCC44CE247BAF1E5 Ref B: AMS231032609017 Ref C: 2024-07-11T10:40:57Z" ], + "Date": [ "Thu, 11 Jul 2024 10:40:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "626" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:40:44.44Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912580753337\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=K2iE0X3m8_F4lsJnENu2qvGQ2Vd7Gy4h06Sm3qJsVnPFf_GCNhsLsjlHmS1BrO0u6vzenJfHOZt997z5O4-JDAoY-stvlidbXaa2dQWFttMGvgz5vd3_tV8GSzi7SRUvK6ZXZ9di7FrhQAARbllJnhoVk0AgMEkKVrFoEgjJz_RUKN5gF39YwjJpgD7KZWz8y5wJpJ9Nact-VtxyBcESNNqXJ6ctm7pKbRbAo3JYxG6iULLU7rHxyMdB0Gk1Z2JSDtTOkCIkpxbU40aTJRNrgqK5YH9M5paFtnuHXNY2QXMnRxcl0kwh9UYm-aI1_DQ-an0VHbuVlm0WCzELdCu53w\u0026h=ukjFt_805Bx1vfmTQ1IFuseZsYmKDArN5fzecweePak+8": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912580753337\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=K2iE0X3m8_F4lsJnENu2qvGQ2Vd7Gy4h06Sm3qJsVnPFf_GCNhsLsjlHmS1BrO0u6vzenJfHOZt997z5O4-JDAoY-stvlidbXaa2dQWFttMGvgz5vd3_tV8GSzi7SRUvK6ZXZ9di7FrhQAARbllJnhoVk0AgMEkKVrFoEgjJz_RUKN5gF39YwjJpgD7KZWz8y5wJpJ9Nact-VtxyBcESNNqXJ6ctm7pKbRbAo3JYxG6iULLU7rHxyMdB0Gk1Z2JSDtTOkCIkpxbU40aTJRNrgqK5YH9M5paFtnuHXNY2QXMnRxcl0kwh9UYm-aI1_DQ-an0VHbuVlm0WCzELdCu53w\u0026h=ukjFt_805Bx1vfmTQ1IFuseZsYmKDArN5fzecweePak", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200a97d-0000-0100-0000-668fb6d50000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912886903905\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=D9lHmfszhQZHoEAKrmuKpx3HB6Rq1BUbS_R7-pkBBBtzaB9nFRDpdMGw5QnSr5gEP9qlrPb2xqMV4T_rC_dlkJzhti9cUwjH4zPkmN95SGjhL1zUWznTUtwQCzFNX-axcFaWEOg5sFkYIYB_TlvOYIIJNioThUG52YrFu7qRO-wUT_EIWbCGJ1ANxPto0igBKmEGkB_dWIMK2CkuMHQzh5GCAXlbzuqm3dhd98p5FspxbRiHA_ce3aCdZbi02IDVcUDxU7nKuRYMyCRj-a7yAAhSzCk733zXPj3ASO4ZX4O8x4AY_mOBgZIN0foi8UdQiXtRK8VaeUemMQImPiVYhg\u0026h=onM1zSj9azL2BlNeTRpUNZ6vuHS3Ry6YHMCxc-m_qWE" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912886903905\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=D9lHmfszhQZHoEAKrmuKpx3HB6Rq1BUbS_R7-pkBBBtzaB9nFRDpdMGw5QnSr5gEP9qlrPb2xqMV4T_rC_dlkJzhti9cUwjH4zPkmN95SGjhL1zUWznTUtwQCzFNX-axcFaWEOg5sFkYIYB_TlvOYIIJNioThUG52YrFu7qRO-wUT_EIWbCGJ1ANxPto0igBKmEGkB_dWIMK2CkuMHQzh5GCAXlbzuqm3dhd98p5FspxbRiHA_ce3aCdZbi02IDVcUDxU7nKuRYMyCRj-a7yAAhSzCk733zXPj3ASO4ZX4O8x4AY_mOBgZIN0foi8UdQiXtRK8VaeUemMQImPiVYhg\u0026h=onM1zSj9azL2BlNeTRpUNZ6vuHS3Ry6YHMCxc-m_qWE" ], + "x-ms-request-id": [ "52b4edb3-491c-4963-9011-e2655234d96f" ], + "x-ms-correlation-request-id": [ "ce1a9075-4766-4cbc-b42f-a42f1d4dbc28" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104128Z:ce1a9075-4766-4cbc-b42f-a42f1d4dbc28" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: BA1F1393AB7444E38398155A587C1065 Ref B: AMS231032609017 Ref C: 2024-07-11T10:41:28Z" ], + "Date": [ "Thu, 11 Jul 2024 10:41:28 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:41:24.901Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912886903905\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=D9lHmfszhQZHoEAKrmuKpx3HB6Rq1BUbS_R7-pkBBBtzaB9nFRDpdMGw5QnSr5gEP9qlrPb2xqMV4T_rC_dlkJzhti9cUwjH4zPkmN95SGjhL1zUWznTUtwQCzFNX-axcFaWEOg5sFkYIYB_TlvOYIIJNioThUG52YrFu7qRO-wUT_EIWbCGJ1ANxPto0igBKmEGkB_dWIMK2CkuMHQzh5GCAXlbzuqm3dhd98p5FspxbRiHA_ce3aCdZbi02IDVcUDxU7nKuRYMyCRj-a7yAAhSzCk733zXPj3ASO4ZX4O8x4AY_mOBgZIN0foi8UdQiXtRK8VaeUemMQImPiVYhg\u0026h=onM1zSj9azL2BlNeTRpUNZ6vuHS3Ry6YHMCxc-m_qWE+9": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562912886903905\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=D9lHmfszhQZHoEAKrmuKpx3HB6Rq1BUbS_R7-pkBBBtzaB9nFRDpdMGw5QnSr5gEP9qlrPb2xqMV4T_rC_dlkJzhti9cUwjH4zPkmN95SGjhL1zUWznTUtwQCzFNX-axcFaWEOg5sFkYIYB_TlvOYIIJNioThUG52YrFu7qRO-wUT_EIWbCGJ1ANxPto0igBKmEGkB_dWIMK2CkuMHQzh5GCAXlbzuqm3dhd98p5FspxbRiHA_ce3aCdZbi02IDVcUDxU7nKuRYMyCRj-a7yAAhSzCk733zXPj3ASO4ZX4O8x4AY_mOBgZIN0foi8UdQiXtRK8VaeUemMQImPiVYhg\u0026h=onM1zSj9azL2BlNeTRpUNZ6vuHS3Ry6YHMCxc-m_qWE", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2003a7e-0000-0100-0000-668fb6ea0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913191649633\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=nWsNF0dLh24NzJQCtd1Ad9rrAt8n-RJKIz7dcpM-xPQtcgZcRW7Qxzf9cTAIFVvrh5X1TfsoZ1PINYPtUdldKFy5JOSjXMtK0cwkOEm71QNLqVfLGu5FjTuvMxtz7cWEL5yWunQJcdrTxC6K-RyOq6MZH9LuZHvu_Z-iEjwUyWJRsjb6JQ_9HwqEFgQ9ugQxL6U-HSApMcWl2wB4nXYxaJMEebxovYmUhLWG71soYNfhAticmLVVEeVP_ntFQ1kcdJsNhfleKWoKd7gzZlkFt1LPkXjLuJop4K-zzfIoxhYBKvhIcavTZ4kUpA7WI-kVI86gQAixwNkE3i-tO7CILg\u0026h=3LOkOzLegDQayEBpWaZUGArBZAMtWntV6FTxcdhtXX0" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913191493366\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=tClMxs_vAM09Mukkjb_GYJBvCLjt_zm1QhClCwLfGMiPJrmgriUr6wvIj1JIjfJLCfQx6Wj-VfN0ntwjwhmk9xDBMfz-hlX2s8N-uorkE9k08G6ei5HcF5rZM0eTzGne7mPMN9O7NXGBqcrMX-_J2w9XN4KgQFCUCNYoxNDn_uZLznKCoqILhZhtVWWPKJskKyXnzljXM2Ic3b1g6ioSRJyURvF7zv5b1n2HbbTbRsk5LjsTSxa8yfsb3jD5tVAZfWu6qGNKFGwdeTum3sq28FPNyI0ywNRj3vAtzYNUqin9Qb-lKNOaX_-02XAgtZSM0b62zZ_4YS7MhxStVm4uBg\u0026h=HiZeNKaraa5CAQCT9GFbG-iZvTdcXKnRhQENZseC0SU" ], + "x-ms-request-id": [ "7636b565-2617-4f67-93d8-bc5238221699" ], + "x-ms-correlation-request-id": [ "1397a72e-6e60-435f-9ac6-99cc54cd0bed" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104159Z:1397a72e-6e60-435f-9ac6-99cc54cd0bed" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1F13B8C8E2BA45E9921CA10C43D9F0F6 Ref B: AMS231032609017 Ref C: 2024-07-11T10:41:58Z" ], + "Date": [ "Thu, 11 Jul 2024 10:41:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:41:46.497Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913191493366\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=tClMxs_vAM09Mukkjb_GYJBvCLjt_zm1QhClCwLfGMiPJrmgriUr6wvIj1JIjfJLCfQx6Wj-VfN0ntwjwhmk9xDBMfz-hlX2s8N-uorkE9k08G6ei5HcF5rZM0eTzGne7mPMN9O7NXGBqcrMX-_J2w9XN4KgQFCUCNYoxNDn_uZLznKCoqILhZhtVWWPKJskKyXnzljXM2Ic3b1g6ioSRJyURvF7zv5b1n2HbbTbRsk5LjsTSxa8yfsb3jD5tVAZfWu6qGNKFGwdeTum3sq28FPNyI0ywNRj3vAtzYNUqin9Qb-lKNOaX_-02XAgtZSM0b62zZ_4YS7MhxStVm4uBg\u0026h=HiZeNKaraa5CAQCT9GFbG-iZvTdcXKnRhQENZseC0SU+10": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913191493366\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=tClMxs_vAM09Mukkjb_GYJBvCLjt_zm1QhClCwLfGMiPJrmgriUr6wvIj1JIjfJLCfQx6Wj-VfN0ntwjwhmk9xDBMfz-hlX2s8N-uorkE9k08G6ei5HcF5rZM0eTzGne7mPMN9O7NXGBqcrMX-_J2w9XN4KgQFCUCNYoxNDn_uZLznKCoqILhZhtVWWPKJskKyXnzljXM2Ic3b1g6ioSRJyURvF7zv5b1n2HbbTbRsk5LjsTSxa8yfsb3jD5tVAZfWu6qGNKFGwdeTum3sq28FPNyI0ywNRj3vAtzYNUqin9Qb-lKNOaX_-02XAgtZSM0b62zZ_4YS7MhxStVm4uBg\u0026h=HiZeNKaraa5CAQCT9GFbG-iZvTdcXKnRhQENZseC0SU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200467f-0000-0100-0000-668fb7140000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913496601634\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=gjPJrvMauGB0KElddJXJSdL8jE0SKcOIcZomdBQiK1OvcAlua7oIN3Feb-sl7H2LnXK-EJV39p2261P39_OJqRK68TvhbUA2JBOSbYTe2tJ9x954aglkpOuX84sgu66TSpcDvflPbhWX3q3JaVCqdBiEH8fEbX8RQxv0Zv6yHmzSz5i3_cF1xRciM3VCK-65AiQvNv6eTN2VTWzOsLApt8IsPXE53tfCGwgxPcLK4njueN9ryFqfX9DZ0DAZV_KHCAYHCM026n9fWt5OXcx4v57EjWUJ4tCSz1RaSGatHhdp2hCoGG7u08rhs5MMwgVCHKHFx3kmw-o0PbGzxX3SPA\u0026h=hxZL_WzjZPmIJzQcGqK1lcVEpk-CdW2VTtkx7auBJgk" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913496601634\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=gjPJrvMauGB0KElddJXJSdL8jE0SKcOIcZomdBQiK1OvcAlua7oIN3Feb-sl7H2LnXK-EJV39p2261P39_OJqRK68TvhbUA2JBOSbYTe2tJ9x954aglkpOuX84sgu66TSpcDvflPbhWX3q3JaVCqdBiEH8fEbX8RQxv0Zv6yHmzSz5i3_cF1xRciM3VCK-65AiQvNv6eTN2VTWzOsLApt8IsPXE53tfCGwgxPcLK4njueN9ryFqfX9DZ0DAZV_KHCAYHCM026n9fWt5OXcx4v57EjWUJ4tCSz1RaSGatHhdp2hCoGG7u08rhs5MMwgVCHKHFx3kmw-o0PbGzxX3SPA\u0026h=hxZL_WzjZPmIJzQcGqK1lcVEpk-CdW2VTtkx7auBJgk" ], + "x-ms-request-id": [ "2aca0490-113a-424e-9470-5bf3fac162fb" ], + "x-ms-correlation-request-id": [ "a1e65ab4-ef45-4b52-b16a-9858d3c759c3" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104229Z:a1e65ab4-ef45-4b52-b16a-9858d3c759c3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: A10F434A8EC341CDB8F7109D0A653B43 Ref B: AMS231032609017 Ref C: 2024-07-11T10:42:29Z" ], + "Date": [ "Thu, 11 Jul 2024 10:42:29 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "626" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:42:28.33Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913496601634\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=gjPJrvMauGB0KElddJXJSdL8jE0SKcOIcZomdBQiK1OvcAlua7oIN3Feb-sl7H2LnXK-EJV39p2261P39_OJqRK68TvhbUA2JBOSbYTe2tJ9x954aglkpOuX84sgu66TSpcDvflPbhWX3q3JaVCqdBiEH8fEbX8RQxv0Zv6yHmzSz5i3_cF1xRciM3VCK-65AiQvNv6eTN2VTWzOsLApt8IsPXE53tfCGwgxPcLK4njueN9ryFqfX9DZ0DAZV_KHCAYHCM026n9fWt5OXcx4v57EjWUJ4tCSz1RaSGatHhdp2hCoGG7u08rhs5MMwgVCHKHFx3kmw-o0PbGzxX3SPA\u0026h=hxZL_WzjZPmIJzQcGqK1lcVEpk-CdW2VTtkx7auBJgk+11": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913496601634\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=gjPJrvMauGB0KElddJXJSdL8jE0SKcOIcZomdBQiK1OvcAlua7oIN3Feb-sl7H2LnXK-EJV39p2261P39_OJqRK68TvhbUA2JBOSbYTe2tJ9x954aglkpOuX84sgu66TSpcDvflPbhWX3q3JaVCqdBiEH8fEbX8RQxv0Zv6yHmzSz5i3_cF1xRciM3VCK-65AiQvNv6eTN2VTWzOsLApt8IsPXE53tfCGwgxPcLK4njueN9ryFqfX9DZ0DAZV_KHCAYHCM026n9fWt5OXcx4v57EjWUJ4tCSz1RaSGatHhdp2hCoGG7u08rhs5MMwgVCHKHFx3kmw-o0PbGzxX3SPA\u0026h=hxZL_WzjZPmIJzQcGqK1lcVEpk-CdW2VTtkx7auBJgk", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200bb7f-0000-0100-0000-668fb72b0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913801558176\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=iPWjIViwPqRQESMJNyDYEKIzAE2qSqtrQI7qDNPTHlYpdG6DR86qtvOKcx8M13MAIvj2uUPV4OB3YrkRlOJf67qZQ-pNEeRcOjL-JEF3hXC2AN-MuYCcnTER-9YG7GErIgdDmKT6KYwhH597jIsKz9W-Bt-jrSn_O_gG1VIH58I_RE8MFXZvetGp8GRWAFJLsxH4gahaH_AdYP-RsMRAX8AF58wztxZa5CSDIgOZ7jJzB1K1gOw1MhgwgB8VFZde4vQNNobNH8DPWM1UwEz8B9Nk34dwYiU1R0JgDPebr2EqcsTSNnU8NgAYtmBHwcFXdCkEByzZfgKMnj-7_RpYbQ\u0026h=SS9RXxqitwPb6lEKLJ_Qzs85UJc73rS_XH-jivZsAjw" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913801401921\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=GWVGxT2pBz6a1PUySmy3-L3TnnKHdjYKuaePR9khVuuIDjykcqeq7k8HjjsCEztYd4UtAs1WOQdPAACcdw-Vm7H7gOJCAqIgHKeQEx02cJg1xhoXebW9lfqnZBJuP-llFfnB50Li_ChZMhKIPtwYYZxPZKZzV1pGWUUDYv6OBcSXNU7nTpYTANNAzyUzle-vM4RIyoDWBgFeH34twQUo2lQt6f2DQDyl9Vc7ZjhmqxXst7YEZuDBUuLU8ADfHnsnZJc2LF6RdEXz22PcKXssoD3kK81qsvlwT4GKRAGyOqemdm_MA4loOge4RTnyqRTkAyhBaudg8MqNdU_nOZDatw\u0026h=TcrN1arsHDz7_t6jJuTtUoHzWBAa_Q76LmeJ_U-3E2Q" ], + "x-ms-request-id": [ "b76ba631-6ce8-4c63-a644-d8a16a7f5a73" ], + "x-ms-correlation-request-id": [ "bc820219-0bf1-45a4-8bb0-9cd8a67058df" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104300Z:bc820219-0bf1-45a4-8bb0-9cd8a67058df" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 473FD82871F1426FBDBF74796B62BB94 Ref B: AMS231032609017 Ref C: 2024-07-11T10:42:59Z" ], + "Date": [ "Thu, 11 Jul 2024 10:42:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:42:50.977Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913801401921\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=GWVGxT2pBz6a1PUySmy3-L3TnnKHdjYKuaePR9khVuuIDjykcqeq7k8HjjsCEztYd4UtAs1WOQdPAACcdw-Vm7H7gOJCAqIgHKeQEx02cJg1xhoXebW9lfqnZBJuP-llFfnB50Li_ChZMhKIPtwYYZxPZKZzV1pGWUUDYv6OBcSXNU7nTpYTANNAzyUzle-vM4RIyoDWBgFeH34twQUo2lQt6f2DQDyl9Vc7ZjhmqxXst7YEZuDBUuLU8ADfHnsnZJc2LF6RdEXz22PcKXssoD3kK81qsvlwT4GKRAGyOqemdm_MA4loOge4RTnyqRTkAyhBaudg8MqNdU_nOZDatw\u0026h=TcrN1arsHDz7_t6jJuTtUoHzWBAa_Q76LmeJ_U-3E2Q+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562913801401921\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=GWVGxT2pBz6a1PUySmy3-L3TnnKHdjYKuaePR9khVuuIDjykcqeq7k8HjjsCEztYd4UtAs1WOQdPAACcdw-Vm7H7gOJCAqIgHKeQEx02cJg1xhoXebW9lfqnZBJuP-llFfnB50Li_ChZMhKIPtwYYZxPZKZzV1pGWUUDYv6OBcSXNU7nTpYTANNAzyUzle-vM4RIyoDWBgFeH34twQUo2lQt6f2DQDyl9Vc7ZjhmqxXst7YEZuDBUuLU8ADfHnsnZJc2LF6RdEXz22PcKXssoD3kK81qsvlwT4GKRAGyOqemdm_MA4loOge4RTnyqRTkAyhBaudg8MqNdU_nOZDatw\u0026h=TcrN1arsHDz7_t6jJuTtUoHzWBAa_Q76LmeJ_U-3E2Q", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2008080-0000-0100-0000-668fb74b0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914104564686\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=BdkdzYnSFDR4jswYKtdKgRYRzj0xsnAStv7asNP8tL7gao8amWZIxLKD7nM1gkbRAkzuGuI67qNo61KVzotjLDNi4CSF5dODYI4Xmyf7ZbU0ce-PRyDTko7DunZrBVUhK958GxPaTCYT3pa259MvgU41J1vByZUYDKwp-8SkszNiTPFtq72ePVwBqRd5RYCxf_Bd0zBvYGqIuopkb9ssKLNnKdxSd83VQ1gV9_tKXrOSe3bTOlNKSZ1XjR9akEzYkuFKjUGeeGm01cCF_h3E_X36Y0WVMqUS45eyhZwYll28u25ojtmheRlJ7KNeP3xe2_Ck2drwPF0YAWD7MylX0Q\u0026h=x6cVaCtMK3a9wleOcg1iXJv-Y9rgGACY8kmAVw7PgBs" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914104407299\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=VRMZr18hFOUm_juBdLM6MrvADfNJJAbJubnybF0OBXkHc_jle6h6M0Pglbowdidsm7aYqN5VJyFBY0d5KRaOKt-nSVz0GKJtft8RghaoRtpH3y8V8aJ_oHqg5RV5NPkz6M7zvCcxnkRqz1UMPdJyHVyg95S88rp4rtOJVarWyvO_j2c-mq1zLhbKXzAjzuR1XT44bwhlvg302M8kgUPlryydQ82pDGY3bNZ6fcaNN6az7yLN6EC_KAsOaBwz0VN34wQl2KjDx7csmSC-XeJIRUeUeBq4haXawhJomVXdgNOTzXasCnmc01d1cojapNeLTNaO8VgqWjKerDXwy2Q3Yw\u0026h=uqAvhmRUpP4Y0RDd-P6Ccl4H0zUIElVBKRPec4ycjGU" ], + "x-ms-request-id": [ "df04ae5f-b89f-46f1-862a-84493da029b2" ], + "x-ms-correlation-request-id": [ "f4940a37-0db7-4480-9e87-b706344a1704" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104330Z:f4940a37-0db7-4480-9e87-b706344a1704" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: EF04FA356FEE4CAC828B2EC7DB886FFB Ref B: AMS231032609017 Ref C: 2024-07-11T10:43:30Z" ], + "Date": [ "Thu, 11 Jul 2024 10:43:30 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:43:22.881Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914104407299\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=VRMZr18hFOUm_juBdLM6MrvADfNJJAbJubnybF0OBXkHc_jle6h6M0Pglbowdidsm7aYqN5VJyFBY0d5KRaOKt-nSVz0GKJtft8RghaoRtpH3y8V8aJ_oHqg5RV5NPkz6M7zvCcxnkRqz1UMPdJyHVyg95S88rp4rtOJVarWyvO_j2c-mq1zLhbKXzAjzuR1XT44bwhlvg302M8kgUPlryydQ82pDGY3bNZ6fcaNN6az7yLN6EC_KAsOaBwz0VN34wQl2KjDx7csmSC-XeJIRUeUeBq4haXawhJomVXdgNOTzXasCnmc01d1cojapNeLTNaO8VgqWjKerDXwy2Q3Yw\u0026h=uqAvhmRUpP4Y0RDd-P6Ccl4H0zUIElVBKRPec4ycjGU+13": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914104407299\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=VRMZr18hFOUm_juBdLM6MrvADfNJJAbJubnybF0OBXkHc_jle6h6M0Pglbowdidsm7aYqN5VJyFBY0d5KRaOKt-nSVz0GKJtft8RghaoRtpH3y8V8aJ_oHqg5RV5NPkz6M7zvCcxnkRqz1UMPdJyHVyg95S88rp4rtOJVarWyvO_j2c-mq1zLhbKXzAjzuR1XT44bwhlvg302M8kgUPlryydQ82pDGY3bNZ6fcaNN6az7yLN6EC_KAsOaBwz0VN34wQl2KjDx7csmSC-XeJIRUeUeBq4haXawhJomVXdgNOTzXasCnmc01d1cojapNeLTNaO8VgqWjKerDXwy2Q3Yw\u0026h=uqAvhmRUpP4Y0RDd-P6Ccl4H0zUIElVBKRPec4ycjGU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2003181-0000-0100-0000-668fb7660000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914410450733\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=oMmOo0HXYo1NY3xQF7snHP6WRrbDGUmxTxJZqYiPTwkWVQ4138Md-GQXSOqNk_du2CxhII9NFW414KP1y5MrSX6fE2ghKxiRBu0hGkemAXFtaPpLe2rgXJhlXdyHPQmyLCQxoJ9xcMB4bsWNBKKdl-gc5APqy3lu1uZ1cTELaCKAvSv5FDuyuLg-nPN8hK4_V2K_rzauV28jkz_I3t02CzuP0aAx72OnBsF9BljB36Fc5BGCGuWDepX1Fvlx_4dDDwDvJkQCJOMjK9UWcEQSnp5BeaVvsTceokM5B2xzIMormfnoIDecTLlSV8sGUpYJRMuN22oy6xE22vpZAK_Zag\u0026h=PG5xQ8laYIlAISUxEa1HxlbmNsi1HEPslpTf_5e1g8I" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914410450733\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=oMmOo0HXYo1NY3xQF7snHP6WRrbDGUmxTxJZqYiPTwkWVQ4138Md-GQXSOqNk_du2CxhII9NFW414KP1y5MrSX6fE2ghKxiRBu0hGkemAXFtaPpLe2rgXJhlXdyHPQmyLCQxoJ9xcMB4bsWNBKKdl-gc5APqy3lu1uZ1cTELaCKAvSv5FDuyuLg-nPN8hK4_V2K_rzauV28jkz_I3t02CzuP0aAx72OnBsF9BljB36Fc5BGCGuWDepX1Fvlx_4dDDwDvJkQCJOMjK9UWcEQSnp5BeaVvsTceokM5B2xzIMormfnoIDecTLlSV8sGUpYJRMuN22oy6xE22vpZAK_Zag\u0026h=PG5xQ8laYIlAISUxEa1HxlbmNsi1HEPslpTf_5e1g8I" ], + "x-ms-request-id": [ "0a83fbce-3a32-42ce-aae9-43f63efc28c9" ], + "x-ms-correlation-request-id": [ "6f493e87-53de-4e09-8339-9fc215a0c884" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104401Z:6f493e87-53de-4e09-8339-9fc215a0c884" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 7148CC2440F847B4A8D5486AE51086C7 Ref B: AMS231032609017 Ref C: 2024-07-11T10:44:00Z" ], + "Date": [ "Thu, 11 Jul 2024 10:44:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:43:46.127Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914410450733\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=oMmOo0HXYo1NY3xQF7snHP6WRrbDGUmxTxJZqYiPTwkWVQ4138Md-GQXSOqNk_du2CxhII9NFW414KP1y5MrSX6fE2ghKxiRBu0hGkemAXFtaPpLe2rgXJhlXdyHPQmyLCQxoJ9xcMB4bsWNBKKdl-gc5APqy3lu1uZ1cTELaCKAvSv5FDuyuLg-nPN8hK4_V2K_rzauV28jkz_I3t02CzuP0aAx72OnBsF9BljB36Fc5BGCGuWDepX1Fvlx_4dDDwDvJkQCJOMjK9UWcEQSnp5BeaVvsTceokM5B2xzIMormfnoIDecTLlSV8sGUpYJRMuN22oy6xE22vpZAK_Zag\u0026h=PG5xQ8laYIlAISUxEa1HxlbmNsi1HEPslpTf_5e1g8I+14": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914410450733\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=oMmOo0HXYo1NY3xQF7snHP6WRrbDGUmxTxJZqYiPTwkWVQ4138Md-GQXSOqNk_du2CxhII9NFW414KP1y5MrSX6fE2ghKxiRBu0hGkemAXFtaPpLe2rgXJhlXdyHPQmyLCQxoJ9xcMB4bsWNBKKdl-gc5APqy3lu1uZ1cTELaCKAvSv5FDuyuLg-nPN8hK4_V2K_rzauV28jkz_I3t02CzuP0aAx72OnBsF9BljB36Fc5BGCGuWDepX1Fvlx_4dDDwDvJkQCJOMjK9UWcEQSnp5BeaVvsTceokM5B2xzIMormfnoIDecTLlSV8sGUpYJRMuN22oy6xE22vpZAK_Zag\u0026h=PG5xQ8laYIlAISUxEa1HxlbmNsi1HEPslpTf_5e1g8I", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2002a82-0000-0100-0000-668fb78f0000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914715915116\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=e7-N8v7V7GhQyWzQK5H5nnuEgHXX50FcaPoqOvlBySpotm4CR0flFhJfqnoXsXiqBFtFFlm6NwHK6-67hjzlZcCffrYNwu_EV2eDnb0Hb4Q8Aj-jh-EJ1LT-X55n7caDJ67Kucj9uGjPhI3melneMA-vX63q1NSTVHCR5Zy_LJAvSqThCjl02Zmjws5bDn4rc0qLmhyf-6JG7uQfsfGoEyXB_rl5FFLVCJXE-oDC3yW_TkCY5J-GMrObYWIWyesGklF36p-prC7pVOiK_3Z1FcBChyFy_luiE7wplPifQkkq7qz_b0K9SFYVisCGBbthZyBMJ5sMy1rLf1SWEp1xsw\u0026h=m-syYUXP4tJa1jHFIXvTHkM19NIAEC2zVgiLAloZ7iY" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914715758827\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AB926oZ2APs5Tesn0yykbrtIZk0hs41KTx_V-wKOkxEgBPiNkGWb_cmoVaVlQjejAWkICQH38pZW98olPQ9jBv6gVoo_NhOFmSFL1lHawaH9xxK3d_-lu5OAxOERaiBSf2TtqRemEumROVwp0s5FOP4dryaTAH4dYbt-QU4kZn6d0E-ONu30LOnokgrtErDwkVokJrww_7OwfjqztHWIAYjxmPeiQYQWnBlXd5vTnJqrJ3mXRehNdP29GAuzUDeF62iKpa-5dT4wNN6oKZNMCMrmVENFjfcADFBu6qt7NJKt3PdgW58NU5O5kRkAJ9IF1w0nXsE3PBGP5hlFdD91rw\u0026h=IaIUWep48VXt0xrM2jkMrHCQJRCxYMapgcLtaBOlj_8" ], + "x-ms-request-id": [ "596f5c85-6b58-4a1a-9adb-2c14364ccaa4" ], + "x-ms-correlation-request-id": [ "dc4cc706-df27-4a6d-89a7-b56089dc6cf5" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104431Z:dc4cc706-df27-4a6d-89a7-b56089dc6cf5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: DA9ABC46CD174971A66AECF532652874 Ref B: AMS231032609017 Ref C: 2024-07-11T10:44:31Z" ], + "Date": [ "Thu, 11 Jul 2024 10:44:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:44:30.989Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914715758827\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AB926oZ2APs5Tesn0yykbrtIZk0hs41KTx_V-wKOkxEgBPiNkGWb_cmoVaVlQjejAWkICQH38pZW98olPQ9jBv6gVoo_NhOFmSFL1lHawaH9xxK3d_-lu5OAxOERaiBSf2TtqRemEumROVwp0s5FOP4dryaTAH4dYbt-QU4kZn6d0E-ONu30LOnokgrtErDwkVokJrww_7OwfjqztHWIAYjxmPeiQYQWnBlXd5vTnJqrJ3mXRehNdP29GAuzUDeF62iKpa-5dT4wNN6oKZNMCMrmVENFjfcADFBu6qt7NJKt3PdgW58NU5O5kRkAJ9IF1w0nXsE3PBGP5hlFdD91rw\u0026h=IaIUWep48VXt0xrM2jkMrHCQJRCxYMapgcLtaBOlj_8+15": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562914715758827\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AB926oZ2APs5Tesn0yykbrtIZk0hs41KTx_V-wKOkxEgBPiNkGWb_cmoVaVlQjejAWkICQH38pZW98olPQ9jBv6gVoo_NhOFmSFL1lHawaH9xxK3d_-lu5OAxOERaiBSf2TtqRemEumROVwp0s5FOP4dryaTAH4dYbt-QU4kZn6d0E-ONu30LOnokgrtErDwkVokJrww_7OwfjqztHWIAYjxmPeiQYQWnBlXd5vTnJqrJ3mXRehNdP29GAuzUDeF62iKpa-5dT4wNN6oKZNMCMrmVENFjfcADFBu6qt7NJKt3PdgW58NU5O5kRkAJ9IF1w0nXsE3PBGP5hlFdD91rw\u0026h=IaIUWep48VXt0xrM2jkMrHCQJRCxYMapgcLtaBOlj_8", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200bd82-0000-0100-0000-668fb7a80000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915020371421\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=U_m5UalZpYcLTqIb3qcVpkrx2bSQsPSlp_mBcUZr8ps7JF8AnuOy12xjJUp3yrMYb2tvnMuiG3u7r7ksPgICmED5J4JVX2pMq5APQq2rgvRxZkpFrVhQ2ECsjbLWZpYxeYd_xNghoLroYlWK_KsT5FhRKkRXPiIbQIA_ml2um305wNEsxohBPRDmizJhdbcoCntyW93x2W30yKqrb3VDCJlOkyAaJUWX7l1kLzBYswS7JwSq9OMHcY652kfDivA7L6FNv90luH5tlGwHx9k1YERYs5H_FEkjqeYCMkLg9mGWYp21QOiVKkLP2gFsWfiQltQQ6tw63LciSNWOWJIQCA\u0026h=d0p8LmqQZKy4MGMhHavYnBCqS0l72kx_9Vne9rcsaRs" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915020371421\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=U_m5UalZpYcLTqIb3qcVpkrx2bSQsPSlp_mBcUZr8ps7JF8AnuOy12xjJUp3yrMYb2tvnMuiG3u7r7ksPgICmED5J4JVX2pMq5APQq2rgvRxZkpFrVhQ2ECsjbLWZpYxeYd_xNghoLroYlWK_KsT5FhRKkRXPiIbQIA_ml2um305wNEsxohBPRDmizJhdbcoCntyW93x2W30yKqrb3VDCJlOkyAaJUWX7l1kLzBYswS7JwSq9OMHcY652kfDivA7L6FNv90luH5tlGwHx9k1YERYs5H_FEkjqeYCMkLg9mGWYp21QOiVKkLP2gFsWfiQltQQ6tw63LciSNWOWJIQCA\u0026h=d0p8LmqQZKy4MGMhHavYnBCqS0l72kx_9Vne9rcsaRs" ], + "x-ms-request-id": [ "aea437bb-f0e3-49fc-8fea-ae689b0d8311" ], + "x-ms-correlation-request-id": [ "56ab5037-d950-4b06-9080-2389503b303f" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104502Z:56ab5037-d950-4b06-9080-2389503b303f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 0EF5E6E4E0614553B8AA8BD6B217D54A Ref B: AMS231032609017 Ref C: 2024-07-11T10:45:01Z" ], + "Date": [ "Thu, 11 Jul 2024 10:45:01 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:44:56.215Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915020371421\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=U_m5UalZpYcLTqIb3qcVpkrx2bSQsPSlp_mBcUZr8ps7JF8AnuOy12xjJUp3yrMYb2tvnMuiG3u7r7ksPgICmED5J4JVX2pMq5APQq2rgvRxZkpFrVhQ2ECsjbLWZpYxeYd_xNghoLroYlWK_KsT5FhRKkRXPiIbQIA_ml2um305wNEsxohBPRDmizJhdbcoCntyW93x2W30yKqrb3VDCJlOkyAaJUWX7l1kLzBYswS7JwSq9OMHcY652kfDivA7L6FNv90luH5tlGwHx9k1YERYs5H_FEkjqeYCMkLg9mGWYp21QOiVKkLP2gFsWfiQltQQ6tw63LciSNWOWJIQCA\u0026h=d0p8LmqQZKy4MGMhHavYnBCqS0l72kx_9Vne9rcsaRs+16": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915020371421\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=U_m5UalZpYcLTqIb3qcVpkrx2bSQsPSlp_mBcUZr8ps7JF8AnuOy12xjJUp3yrMYb2tvnMuiG3u7r7ksPgICmED5J4JVX2pMq5APQq2rgvRxZkpFrVhQ2ECsjbLWZpYxeYd_xNghoLroYlWK_KsT5FhRKkRXPiIbQIA_ml2um305wNEsxohBPRDmizJhdbcoCntyW93x2W30yKqrb3VDCJlOkyAaJUWX7l1kLzBYswS7JwSq9OMHcY652kfDivA7L6FNv90luH5tlGwHx9k1YERYs5H_FEkjqeYCMkLg9mGWYp21QOiVKkLP2gFsWfiQltQQ6tw63LciSNWOWJIQCA\u0026h=d0p8LmqQZKy4MGMhHavYnBCqS0l72kx_9Vne9rcsaRs", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2009b83-0000-0100-0000-668fb7c90000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915333112935\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=FbGGGiSUtcs7kSxqJ2aLGIcaR9eKxEW4TpRWiQpsNpKUaY4heAh4TIqPG5EyGHT1qK0r1IkFHv8Z0xRArSM1sqSAUEFYwYOD1hEv82qroJeRlaFw9oZv7tm2q9fjPtQhC0l8SZeWdrIth_bfM6NcwogXEwKBH3Dlwpe_PS34LrXYT1qLwgH908xG0oyktj4e-9PzEMl6YhLk3J3zaV_bzn5WLYrQTTet9NFuPFibr6W81_s-a8cTpbwqekWUjZw_YAMqRrs-8-MWt-JI8j9h3nJV3puYGo0REXdaOnTYWAdcalGNJRFsbOsJIuEIWXng8EgOWTNXdp_5ZMCebqDBng\u0026h=fernAPSxaxxZex5kBZzo4PQGy5yajSpRnhAZZXU06yM" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915332644207\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AdnqknQvZZgI9u_jRYv0CpT46UtYuiflvQsn8gYGQdoIN6WFMn_LKl8fUWLg8D12dDqjBHEImZg6rxZe8v50NVgRZfYMz5NxdUjJTIypqWcuiGOratPuHwVvZdSVBIJI58SZYcbKWQ4GCH7pT0c81VmZ4jQA58cNl2tuV6_tpoM3pieKCMaLppQzD6n85c78YB_rAfUObY625o6kuyRyn50gSa155kAC1L7IYor3ib31DkZviQLgn7R_Mp1fruvF7u7smpEB_Oy7Tcj0MuinkhGL_WwE8bqdvz5fgLyefbbyRJgzEeys3dC4noWqmgb8ZdAzgSwzvLZJsaaGu8qw6A\u0026h=RAQwDIXJKFYSFdR70BgGUp9oB6f6Wl1TVL10k8mUEFk" ], + "x-ms-request-id": [ "7a45a891-8392-44f0-8e53-9febf0dbf1ad" ], + "x-ms-correlation-request-id": [ "4e058919-b31a-4ddb-932d-3ca429ca4b14" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104533Z:4e058919-b31a-4ddb-932d-3ca429ca4b14" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 9EEA8D222E22436F965B89917761E4E1 Ref B: AMS231032609017 Ref C: 2024-07-11T10:45:32Z" ], + "Date": [ "Thu, 11 Jul 2024 10:45:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:45:28.832Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915332644207\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AdnqknQvZZgI9u_jRYv0CpT46UtYuiflvQsn8gYGQdoIN6WFMn_LKl8fUWLg8D12dDqjBHEImZg6rxZe8v50NVgRZfYMz5NxdUjJTIypqWcuiGOratPuHwVvZdSVBIJI58SZYcbKWQ4GCH7pT0c81VmZ4jQA58cNl2tuV6_tpoM3pieKCMaLppQzD6n85c78YB_rAfUObY625o6kuyRyn50gSa155kAC1L7IYor3ib31DkZviQLgn7R_Mp1fruvF7u7smpEB_Oy7Tcj0MuinkhGL_WwE8bqdvz5fgLyefbbyRJgzEeys3dC4noWqmgb8ZdAzgSwzvLZJsaaGu8qw6A\u0026h=RAQwDIXJKFYSFdR70BgGUp9oB6f6Wl1TVL10k8mUEFk+17": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915332644207\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=AdnqknQvZZgI9u_jRYv0CpT46UtYuiflvQsn8gYGQdoIN6WFMn_LKl8fUWLg8D12dDqjBHEImZg6rxZe8v50NVgRZfYMz5NxdUjJTIypqWcuiGOratPuHwVvZdSVBIJI58SZYcbKWQ4GCH7pT0c81VmZ4jQA58cNl2tuV6_tpoM3pieKCMaLppQzD6n85c78YB_rAfUObY625o6kuyRyn50gSa155kAC1L7IYor3ib31DkZviQLgn7R_Mp1fruvF7u7smpEB_Oy7Tcj0MuinkhGL_WwE8bqdvz5fgLyefbbyRJgzEeys3dC4noWqmgb8ZdAzgSwzvLZJsaaGu8qw6A\u0026h=RAQwDIXJKFYSFdR70BgGUp9oB6f6Wl1TVL10k8mUEFk", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2002484-0000-0100-0000-668fb7e10000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915638256706\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=hpjWIKXT0BJnDRHtgoZkOdgzoAjS7IUbl1NPxxeMSqyork-qVKRtLmHOMLtMxkjJgataMwjUHzy2Kytg_pTFQZ6rC3ttlI_NCwK1tFRA0sVyhTnmqKLanzMWehvHa_tc1SB5SH-ZpP-4dqgKu9reSLmvk5QIE8Q5gl8IsNosezi-3imFI9MaHrGUgAgCQpx2KNz2aclYUHKQWsocG3eUZRO2kyBXyz-tkuuQuoATAsnPmxFz1ZZmjUGrnrVPaSLcAqTsCVTc9RKyEkiFXSZQLkazYrqfGNIg_GOL5pJDwUGhLCRfIkBehYjvNKaSwCeBKgmhcmlSL8OoeoFcphM2Sg\u0026h=m42lHEwS9y7tLvvwCGn03AwKaX9k2Y91plyoOi47efo" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915638101639\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=OvW_BvUTb3gHE5oAi_KK0-L8EiU124mSz6YM8LNJ3stlCF-liga5E3fCQ_gc6mxgGRL0Hh5PJuxKW_U-feHTN4bgi1D7yU7lvT8NRetCie_iSZP1xxrhMvVQntV94klLQCTxHwEYFp_Nify3Oh8QqfzUFBGHrO4e7hivyjKHLu34Vv7zad-4zSDlgER7bQiUFSQlAEDtWGE1Kw659pMFsP-n4EE1hgV8bP-B6mwpqM3W8HvSxUAmXQSyXjxjTevsTUWj0C_4NSyKlc320lZOTJdxfdn52rQP3JjvJ65kGjpen3dTmolJ_vs61Y9B2ZWc_4uvKKYxKmCKdOFMhF8C4w\u0026h=Yk-7OdSm-Y_vnK5OrJbh097agKUGs0-1X8nE-3FzXE8" ], + "x-ms-request-id": [ "9ec444fb-0738-4690-8bc0-e99d8f497409" ], + "x-ms-correlation-request-id": [ "4fecaf77-afc5-42fa-b788-77b615a9e64e" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104603Z:4fecaf77-afc5-42fa-b788-77b615a9e64e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: E00F14C74C0544DC8993FAD19BE5983A Ref B: AMS231032609017 Ref C: 2024-07-11T10:46:03Z" ], + "Date": [ "Thu, 11 Jul 2024 10:46:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:45:52.602Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915638101639\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=OvW_BvUTb3gHE5oAi_KK0-L8EiU124mSz6YM8LNJ3stlCF-liga5E3fCQ_gc6mxgGRL0Hh5PJuxKW_U-feHTN4bgi1D7yU7lvT8NRetCie_iSZP1xxrhMvVQntV94klLQCTxHwEYFp_Nify3Oh8QqfzUFBGHrO4e7hivyjKHLu34Vv7zad-4zSDlgER7bQiUFSQlAEDtWGE1Kw659pMFsP-n4EE1hgV8bP-B6mwpqM3W8HvSxUAmXQSyXjxjTevsTUWj0C_4NSyKlc320lZOTJdxfdn52rQP3JjvJ65kGjpen3dTmolJ_vs61Y9B2ZWc_4uvKKYxKmCKdOFMhF8C4w\u0026h=Yk-7OdSm-Y_vnK5OrJbh097agKUGs0-1X8nE-3FzXE8+18": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915638101639\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=OvW_BvUTb3gHE5oAi_KK0-L8EiU124mSz6YM8LNJ3stlCF-liga5E3fCQ_gc6mxgGRL0Hh5PJuxKW_U-feHTN4bgi1D7yU7lvT8NRetCie_iSZP1xxrhMvVQntV94klLQCTxHwEYFp_Nify3Oh8QqfzUFBGHrO4e7hivyjKHLu34Vv7zad-4zSDlgER7bQiUFSQlAEDtWGE1Kw659pMFsP-n4EE1hgV8bP-B6mwpqM3W8HvSxUAmXQSyXjxjTevsTUWj0C_4NSyKlc320lZOTJdxfdn52rQP3JjvJ65kGjpen3dTmolJ_vs61Y9B2ZWc_4uvKKYxKmCKdOFMhF8C4w\u0026h=Yk-7OdSm-Y_vnK5OrJbh097agKUGs0-1X8nE-3FzXE8", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a200bc84-0000-0100-0000-668fb8010000\"" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915943091633\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=C7XNzdr-JqyrvcGtPy5Mwvk3dwXTwXSO1EEDnQuG7AoGzVr61BNfjersiQqa8MsSLR_f1bZSTp-vifYV4Nu_VkrXDbh5wRvzntqGCwolls5qWcOE6B4wbekdZ5QYlZM0-iA1AyvdLzBAyVhUMK3xnWSdo_CxqWrHFQAqKwu3STJhoSNtmgUPDT9SAAmPAgnODYk8EHlj16dtdj4KvfwuuXM4RPliW9rUk5ELYXeFmu9xn16ajPb3YiBFRkkv2Hlih4XGUDAaScEEWT0kSnVfG3P3gNKle0a-C4c4mvE2JJz-F5tT6m7ltruMazMckLYkyiC6qo1GuPEEf4h-MN8tSQ\u0026h=Uno1PqQNBHgiitXqOjrPtNKqbRKCeFR9KpQFhYf0SPk" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915942935524\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=QimSqNXy9-BAkatwaW-fsBx7sUI5MFdkV9Rm3qEC2MTJunMmdS9ZK6mgeULyo3LPU89A9r1IY52BugYvHa-PXXMpXK5xaBVuXWwUYZnb1Gf3Nz62M0F1PPVZr7do4mxItj_JTG1HRpeo2o9il6YPa0dDDPQsGT6OInbifRJ0HK-i2Etiwkzk1s7oewGGstVtbJos733MDV9WgjN6d4tXwWfkCnOsBmXEdESc9Ng4j4kTL3KeFWbr01taQlWON2IuDux_cfScxKkyGHdlB9UgZ3oa21hsCGSLMU9q0HHnWm8HYkVL18bUFz8GFr1bKJgfoxyZifFKQHJeEZTIO9XyfQ\u0026h=7AwrZoOnhWc7TNefsNH1JPt7ShFBITwh5LsDCZzuIro" ], + "x-ms-request-id": [ "f8b7712e-afd9-47f5-a94b-3177b8e0cd54" ], + "x-ms-correlation-request-id": [ "43f76dd3-e3c6-4844-b738-2ea5dc870e43" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104634Z:43f76dd3-e3c6-4844-b738-2ea5dc870e43" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 72DA17054D6740CAAC9EFA3E60108746 Ref B: AMS231032609017 Ref C: 2024-07-11T10:46:34Z" ], + "Date": [ "Thu, 11 Jul 2024 10:46:33 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "627" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Updating\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:46:25.495Z\",\"percentComplete\":100.0}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915942935524\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=QimSqNXy9-BAkatwaW-fsBx7sUI5MFdkV9Rm3qEC2MTJunMmdS9ZK6mgeULyo3LPU89A9r1IY52BugYvHa-PXXMpXK5xaBVuXWwUYZnb1Gf3Nz62M0F1PPVZr7do4mxItj_JTG1HRpeo2o9il6YPa0dDDPQsGT6OInbifRJ0HK-i2Etiwkzk1s7oewGGstVtbJos733MDV9WgjN6d4tXwWfkCnOsBmXEdESc9Ng4j4kTL3KeFWbr01taQlWON2IuDux_cfScxKkyGHdlB9UgZ3oa21hsCGSLMU9q0HHnWm8HYkVL18bUFz8GFr1bKJgfoxyZifFKQHJeEZTIO9XyfQ\u0026h=7AwrZoOnhWc7TNefsNH1JPt7ShFBITwh5LsDCZzuIro+19": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562915942935524\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=QimSqNXy9-BAkatwaW-fsBx7sUI5MFdkV9Rm3qEC2MTJunMmdS9ZK6mgeULyo3LPU89A9r1IY52BugYvHa-PXXMpXK5xaBVuXWwUYZnb1Gf3Nz62M0F1PPVZr7do4mxItj_JTG1HRpeo2o9il6YPa0dDDPQsGT6OInbifRJ0HK-i2Etiwkzk1s7oewGGstVtbJos733MDV9WgjN6d4tXwWfkCnOsBmXEdESc9Ng4j4kTL3KeFWbr01taQlWON2IuDux_cfScxKkyGHdlB9UgZ3oa21hsCGSLMU9q0HHnWm8HYkVL18bUFz8GFr1bKJgfoxyZifFKQHJeEZTIO9XyfQ\u0026h=7AwrZoOnhWc7TNefsNH1JPt7ShFBITwh5LsDCZzuIro", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2008585-0000-0100-0000-668fb8260000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "3e72fae0-11c6-40b4-a9d8-826fd52a039e" ], + "x-ms-correlation-request-id": [ "ad63112b-0237-43a1-9462-53831aa3a47a" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T104704Z:ad63112b-0237-43a1-9462-53831aa3a47a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 2EA68EBC613A4F01ACFFBB8CC8CFD391 Ref B: AMS231032609017 Ref C: 2024-07-11T10:47:04Z" ], + "Date": [ "Thu, 11 Jul 2024 10:47:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "650" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Succeeded\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:47:02.9082024Z\",\"percentComplete\":100.0,\"properties\":null}", + "isContentBase64": false + } + }, + "Invoke-AzOracleSwitchoverAutonomousDatabase+[NoContext]+SwitchoverExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562910746042000\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=CrkSozBeef2w860sF-Haj6a6zTyxLsB1XBCDRtkJj1azBNyqWKP-1C36A313dVjpV6shST_mm1ySOL-DyJ-H7w0sijmdUPxvrcWhLLleSAxTbZDQjmV3bUWU-zHGLjnDse5fXnMYIe2Iv8eSFPJuKzbfL1htuuLBujjeQdIu8WNL_gDHWTuuEuIFXBmVSKpelts9UtgXoBajaql1-4VuoQ0yAcY2OwNx8txVHT_CzKlicCF9KzetRsIpBxup-PebthmSZ-_PxdsxvJgZC715dAq_sRZgJfNMAKOeuwvkqwqrtGfSKhneZZPHlQZnLNXaZeX-Ix5IopLZxk1jdmVgNQ\u0026h=xnVaS92EcZcx6CAOic02lrk5Vg4d1An9AGeCXbUAMrU+20": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638562910746042000\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=CrkSozBeef2w860sF-Haj6a6zTyxLsB1XBCDRtkJj1azBNyqWKP-1C36A313dVjpV6shST_mm1ySOL-DyJ-H7w0sijmdUPxvrcWhLLleSAxTbZDQjmV3bUWU-zHGLjnDse5fXnMYIe2Iv8eSFPJuKzbfL1htuuLBujjeQdIu8WNL_gDHWTuuEuIFXBmVSKpelts9UtgXoBajaql1-4VuoQ0yAcY2OwNx8txVHT_CzKlicCF9KzetRsIpBxup-PebthmSZ-_PxdsxvJgZC715dAq_sRZgJfNMAKOeuwvkqwqrtGfSKhneZZPHlQZnLNXaZeX-Ix5IopLZxk1jdmVgNQ\u0026h=xnVaS92EcZcx6CAOic02lrk5Vg4d1An9AGeCXbUAMrU", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "7454a376-e898-4349-ab7a-345ef3297bbf" ], + "CommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase" ], + "FullCommandName": [ "Invoke-AzOracleSwitchoverAutonomousDatabase_SwitchoverExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "ETag": [ "\"a2008585-0000-0100-0000-668fb8260000\"" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-request-id": [ "6d12cca4-af4d-4ff7-b064-b93fdaafe2a9" ], + "x-ms-correlation-request-id": [ "578429cd-560d-4b61-8870-c083d57022a1" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKWEST:20240711T104705Z:578429cd-560d-4b61-8870-c083d57022a1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 1862754F2A884E099216926009A74F78 Ref B: AMS231032609017 Ref C: 2024-07-11T10:47:05Z" ], + "Date": [ "Thu, 11 Jul 2024 10:47:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "650" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"name\":\"9587f041-217c-4a4f-9655-c94d1766cebf*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798\",\"resourceId\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"status\":\"Succeeded\",\"startTime\":\"2024-07-11T10:37:52.3009093Z\",\"endTime\":\"2024-07-11T10:47:02.9082024Z\",\"percentComplete\":100.0,\"properties\":null}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..29f2abe3f99e --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Invoke-AzOracleSwitchoverAutonomousDatabase.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzOracleSwitchoverAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzOracleSwitchoverAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzOracleSwitchoverAutonomousDatabase' { + It 'SwitchoverExpanded' { + { + Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename $env.adbsName -ResourceGroupName $env.resourceGroup -PeerDbId $env.adbsBackupId + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabase.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..2e5820f8535b --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabase.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleAutonomousDatabase' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabaseBackup.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..4b4ea967fc9d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/New-AzOracleAutonomousDatabaseBackup.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleAutonomousDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleAutonomousDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleAutonomousDatabaseBackup' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/New-AzOracleCloudExadataInfrastructure.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/New-AzOracleCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..e91005a8f165 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/New-AzOracleCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleCloudExadataInfrastructure' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/New-AzOracleCloudVMCluster.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/New-AzOracleCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..410c7be3ce25 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/New-AzOracleCloudVMCluster.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleCloudVMCluster' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/New-AzOracleCustomerContactObject.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/New-AzOracleCustomerContactObject.Tests.ps1 new file mode 100644 index 000000000000..deed38dba7a1 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/New-AzOracleCustomerContactObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleCustomerContactObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleCustomerContactObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleCustomerContactObject' { + It '__AllParameterSets' { + { + New-AzOracleCustomerContactObject -Email "example@oracle.com" + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/New-AzOracleNsgCidrObject.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/New-AzOracleNsgCidrObject.Tests.ps1 new file mode 100644 index 000000000000..be1d351e6047 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/New-AzOracleNsgCidrObject.Tests.ps1 @@ -0,0 +1,23 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleNsgCidrObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleNsgCidrObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleNsgCidrObject' { + It '__AllParameterSets' { + { + New-AzOracleNsgCidrObject -Source "source" -DestinationPortRangeMax 0 -DestinationPortRangeMin 1 + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/README.md b/src/Oracle/Oracle.Autorest/test/README.md new file mode 100644 index 000000000000..7c752b4c8c43 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/README.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabase.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..bb121fda4ef3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabase.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleAutonomousDatabase' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabaseBackup.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..f8ac47b4cae3 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleAutonomousDatabaseBackup.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleAutonomousDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleAutonomousDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleAutonomousDatabaseBackup' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentityAutonomousDatabase' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudExadataInfrastructure.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..4b6956686e62 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleCloudExadataInfrastructure' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMCluster.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..c46bd390678a --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMCluster.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleCloudVMCluster' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Recording.json b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Recording.json new file mode 100644 index 000000000000..99a996ded630 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Recording.json @@ -0,0 +1,89 @@ +{ + "Remove-AzOracleCloudVMClusterVM+[NoContext]+RemoveExpanded+$GET+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers?api-version=2023-09-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers?api-version=2023-09-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "e8c784b6-f9ba-480a-8600-19dc06c08ab6" ], + "CommandName": [ "Get-AzOracleDbServer" ], + "FullCommandName": [ "Get-AzOracleDbServer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v12.0.0", "PSVersion/v7.4.2", "Az.Oracle/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "249" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/621D7DB5F45167EE74F70D2A05D2E979/F03DD3C4ABF510549FB39208BA81BB2A" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "x-ms-request-id": [ "8e8b6d39-cd38-4adb-9f6f-108f7b0577ef" ], + "x-ms-correlation-request-id": [ "a4ba55f3-e2ba-45d1-91ec-b168b4fe8c9b" ], + "x-ms-ratelimit-remaining-subscription-global-reads": [ "3749" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T112553Z:a4ba55f3-e2ba-45d1-91ec-b168b4fe8c9b" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 4A0C9CE926A44F5986AB5FD5A4E4CD7B Ref B: AMS231020512047 Ref C: 2024-07-11T11:25:51Z" ], + "Date": [ "Thu, 11 Jul 2024 11:25:52 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4190" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqabgfb24a7f6y6g3fgumvdu4yu2mskss7kyu7lzmbfirba\",\"name\":\"dbServer-3\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqabgfb24a7f6y6g3fgumvdu4yu2mskss7kyu7lzmbfirba\",\"displayName\":\"dbServer-3\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqakjfdf2qyze4p5leu572snxk6cbrbukejyfdtxggfquuq\",\"cpuCoreCount\":2,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":469,\"vmClusterIds\":[\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqa2w4bxkv4t2ockflwjmwb32osa5exkeg7uitm7ympgaxa\"],\"dbNodeIds\":[\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqamrsva3izm7qognghvksp2ufs2xbti6gcpz3jbcum7xka\"],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":45,\"shape\":null,\"timeCreated\":\"2024-07-07T07:39:59.498Z\",\"lifecycleDetails\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqajnh2fibjkgd4ehwqjscbr4shpbkzt2sqdvx3zuf77t5q\",\"name\":\"dbServer-1\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqajnh2fibjkgd4ehwqjscbr4shpbkzt2sqdvx3zuf77t5q\",\"displayName\":\"dbServer-1\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqakjfdf2qyze4p5leu572snxk6cbrbukejyfdtxggfquuq\",\"cpuCoreCount\":2,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":469,\"vmClusterIds\":[\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqa2w4bxkv4t2ockflwjmwb32osa5exkeg7uitm7ympgaxa\"],\"dbNodeIds\":[\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqaq6oz536w75cduu5aot6obj4n2miwqmso55xmmh23hwjq\"],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":45,\"shape\":null,\"timeCreated\":\"2024-07-07T07:39:59.495Z\",\"lifecycleDetails\":null}},{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqao6qc4wjphqn3ccwd6jjqjynoexlhu23q35cwqdmedixa\",\"name\":\"dbServer-2\",\"type\":\"Oracle.Database/cloudExadataInfrastructures/dbServers\",\"properties\":{\"ocid\":\"ocid1.dbserver.oc1.iad.anuwcljrowjpydqao6qc4wjphqn3ccwd6jjqjynoexlhu23q35cwqdmedixa\",\"displayName\":\"dbServer-2\",\"compartmentId\":\"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua\",\"exadataInfrastructureId\":\"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqakjfdf2qyze4p5leu572snxk6cbrbukejyfdtxggfquuq\",\"cpuCoreCount\":2,\"maxMemoryInGbs\":1390,\"dbNodeStorageSizeInGbs\":469,\"vmClusterIds\":[\"ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqa2w4bxkv4t2ockflwjmwb32osa5exkeg7uitm7ympgaxa\"],\"dbNodeIds\":[\"ocid1.dbnode.oc1.iad.anuwcljrnirvylqa55rdowybx23nrhv3rybslcjaenofmosvwqzsokrgpzna\"],\"provisioningState\":\"Available\",\"lifecycleState\":null,\"dbServerPatchingDetails\":{\"estimatedPatchDuration\":90,\"patchingStatus\":\"Scheduled\",\"timePatchingEnded\":null,\"timePatchingStarted\":null},\"maxCpuCount\":126,\"autonomousVmClusterIds\":[],\"autonomousVirtualMachineIds\":[],\"maxDbNodeStorageInGbs\":2243,\"memorySizeInGbs\":45,\"shape\":null,\"timeCreated\":\"2024-07-07T07:39:59.496Z\",\"lifecycleDetails\":null}}]}", + "isContentBase64": false + } + }, + "Remove-AzOracleCloudVMClusterVM+[NoContext]+RemoveExpanded+$POST+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/removeVms?api-version=2023-09-01+2": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/removeVms?api-version=2023-09-01", + "Content": "{\n \"dbServers\": [ \"ocid1.dbserver.oc1.iad.anuwcljrowjpydqabgfb24a7f6y6g3fgumvdu4yu2mskss7kyu7lzmbfirba\" ]\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "108" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/7a3fb83c-a8d9-4cdd-83d9-5018fb358289*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638562939539855550\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=L2pdjK6gjIlPoNhYSNXmvlvOxTmUixdaZZqUwdJ4g3y8jJdeb0qTp9EAdTHTkMI9sU_vdpGjiYNijClx-9LbC40px2yojn-zR3kLSUalxKmc7iwET0Qx1ZAYnoYFGdogSnRD9Ik8_frY5jH_O1cyMQGgI-vSxWXW9EJBxblk9CYOfefmTh3IotOIgg8Uq3Bb0HiUvQCX4aB-rEH9_NlHK1SvjQHocK0fUZ94W9Djb2zFZ9wORjhk-zBwTJMHBgRgOTFwCgdQ2DY4MANF2eKo4K-C9ys86jxgacZHkvLDWk4Z9FoDTOH-DZyC9ki5qI_G99EZL1ULTK8FNzhQWaZIUQ\u0026h=94ndBnMvGTQkkaoYxwYrheDybD-gsPEN8cEd-hPmYzs" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/57270CB4811265E51A43DC38215F93C2/55142DAFD8626795E2A63CBAABF6F82F" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/7a3fb83c-a8d9-4cdd-83d9-5018fb358289*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-version=2023-09-01\u0026t=638562939539855550\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=L2pdjK6gjIlPoNhYSNXmvlvOxTmUixdaZZqUwdJ4g3y8jJdeb0qTp9EAdTHTkMI9sU_vdpGjiYNijClx-9LbC40px2yojn-zR3kLSUalxKmc7iwET0Qx1ZAYnoYFGdogSnRD9Ik8_frY5jH_O1cyMQGgI-vSxWXW9EJBxblk9CYOfefmTh3IotOIgg8Uq3Bb0HiUvQCX4aB-rEH9_NlHK1SvjQHocK0fUZ94W9Djb2zFZ9wORjhk-zBwTJMHBgRgOTFwCgdQ2DY4MANF2eKo4K-C9ys86jxgacZHkvLDWk4Z9FoDTOH-DZyC9ki5qI_G99EZL1ULTK8FNzhQWaZIUQ\u0026h=94ndBnMvGTQkkaoYxwYrheDybD-gsPEN8cEd-hPmYzs" ], + "x-ms-request-id": [ "7a3fb83c-a8d9-4cdd-83d9-5018fb358289" ], + "x-ms-correlation-request-id": [ "5ab15a21-13bd-4b35-941e-7db694a6c735" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T112554Z:5ab15a21-13bd-4b35-941e-7db694a6c735" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 5DC58BA140E2477E90E0AE4A050F483D Ref B: AMS231020512047 Ref C: 2024-07-11T11:25:53Z" ], + "Date": [ "Thu, 11 Jul 2024 11:25:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1272" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"ocid\":null,\"listenerPort\":null,\"nodeCount\":null,\"storageSizeInGbs\":null,\"dataStorageSizeInTbs\":null,\"dbNodeStorageSizeInGbs\":null,\"memorySizeInGbs\":null,\"timeCreated\":null,\"lifecycleDetails\":null,\"timeZone\":null,\"zoneId\":null,\"hostname\":null,\"domain\":null,\"cpuCoreCount\":null,\"ocpuCount\":null,\"clusterName\":\"OFake_PowerShellTestVmCluster\",\"dataStoragePercentage\":null,\"isLocalBackupEnabled\":null,\"cloudExadataInfrastructureId\":null,\"isSparseDiskgroupEnabled\":null,\"systemVersion\":null,\"sshPublicKeys\":null,\"licenseModel\":null,\"diskRedundancy\":null,\"scanIpIds\":null,\"vipIds\":null,\"scanDnsName\":null,\"scanListenerPortTcp\":null,\"scanListenerPortTcpSsl\":null,\"scanDnsRecordId\":null,\"shape\":null,\"provisioningState\":\"Succeeded\",\"lifecycleState\":null,\"vnetId\":null,\"giVersion\":null,\"ociUrl\":null,\"subnetId\":null,\"dataCollectionOptions\":null,\"displayName\":null,\"iormConfigCache\":null,\"lastUpdateHistoryEntryId\":null,\"dbServers\":null,\"compartmentId\":null,\"subnetOcid\":null,\"nsgCidrs\":null,\"nsgUrl\":null},\"location\":null,\"tags\":null,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster\",\"type\":null,\"name\":\"OFake_PowerShellTestVmCluster\",\"systemData\":null}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Tests.ps1 new file mode 100644 index 000000000000..f023d9974905 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Remove-AzOracleCloudVMClusterVM.Tests.ps1 @@ -0,0 +1,27 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleCloudVMClusterVM')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleCloudVMClusterVM.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleCloudVMClusterVM' { + It 'RemoveExpanded' { + { + $dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $env.exaInfraName -ResourceGroupName $env.resourceGroup + $dbServerOcid1 = $dbServerList[0].Ocid + $dbServersToRemove = @($dbServerOcid1) + + Remove-AzOracleCloudVMClusterVM -NoWait -Cloudvmclustername $env.vmClusterName -ResourceGroupName $env.resourceGroup -DbServer $dbServersToRemove + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Recording.json b/src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Recording.json new file mode 100644 index 000000000000..ed6c077dd1ac --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Recording.json @@ -0,0 +1,44 @@ +{ + "Restore-AzOracleAutonomousDatabase+[NoContext]+RestoreExpanded+$POST+https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/restore?api-version=2023-09-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs/restore?api-version=2023-09-01", + "Content": "{\n \"timestamp\": \"2024-07-11T13:32:18.1278280+00:00\"\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "54" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/ed014167-aa53-4329-822c-f3be2bff6f18*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638563015418581280\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=rkxuv9wNbrTGC3tBS1PUSR_zj7aGSAq6cdabBZiT8cTE8CPKLtPB3O4MFiDi4Ix0die8qBooW93y-ew4m0hUzR_QLf39miw6zggtli-vl0dUX_fnlRo4LOB6aWSb1tQsbN7MG_Vz88o6aNvD-EGO3oMxuS-PEWluUcoyxdqjT1Y-jerb8Ta_WZIR5HfEuHpCkmxOfAMEeDmThBX7jsMnvB98WGJMjY0cRIx57MvGHLWvXmdIft6-xbHrq-50dFVEzTkW6Q30b2816hnW1QTEiIJTcFEk5okXJIQbsFXgZh9DQ8RZ3sjCAi2d05gs9sTBjSV2WQyEiPlu1Ug9HMVJXQ\u0026h=durLvnUfyw3zEgDgCSenbZQBQ0bidArwV8aXM26x5Jk" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "199" ], + "x-ms-providerhub-traffic": [ "True" ], + "opc-request-id": [ "/AB705812C2EC447481C29770238C03BD/30C74C16723978C1268A83A45E6A1308" ], + "X-Content-Type-Options": [ "nosniff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/ed014167-aa53-4329-822c-f3be2bff6f18*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-version=2023-09-01\u0026t=638563015418425053\u0026c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE\u0026s=fkx0-I5aMmMGUBrTxjRe1s36YdMA43EkI_fZP188IzltsOHR5WH1fmVK0vQrea14pX6FGoNZXLbxVs7fBth6_pwQ7m-wyEUrQLi9Et0cfz5vY_AgjL1u2GClDYOsNxMlWtS8Z08HyPGOC2pp8i8wknvuC304KvURjQx33MeWdgzb9pthjDa6FvCZwRc0muFgMc2H5OUV7fR03jIldrOQxASR-ZNjCl3zO9Anwz8bTPJ6CarYaM9-0wkVoFOJbU4IluONrOiof5g4aYD94DFaToozLnFIAsom7LilDdR8Yc6MiMqbXPvDYOgNTKiRbOePXzJ73qYKYJ9s4TBnRM-i-w\u0026h=MXKYaqCue3nGnqLAv7VCoTuyFZIvoiY9pKBaZoCza-k" ], + "x-ms-request-id": [ "ed014167-aa53-4329-822c-f3be2bff6f18" ], + "x-ms-correlation-request-id": [ "ff3e1ef3-8ec1-4987-8286-c2deac9ff019" ], + "x-ms-ratelimit-remaining-subscription-global-writes": [ "2999" ], + "x-ms-routing-request-id": [ "UKSOUTH:20240711T133221Z:ff3e1ef3-8ec1-4987-8286-c2deac9ff019" ], + "X-Cache": [ "CONFIG_NOCACHE" ], + "X-MSEdge-Ref": [ "Ref A: 36E75CF76269422287713D030A552CD3 Ref B: AMS231032608049 Ref C: 2024-07-11T13:32:19Z" ], + "Date": [ "Thu, 11 Jul 2024 13:32:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "8962" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"properties\":{\"dataBaseType\":\"Regular\",\"actualUsedDataStorageSizeInTbs\":0.004357576370239258,\"allocatedStorageSizeInTbs\":0.005859375,\"whitelistedIps\":null,\"apexDetails\":null,\"autonomousDatabaseId\":null,\"autonomousMaintenanceScheduleType\":\"Regular\",\"availableUpgradeVersions\":null,\"characterSet\":\"AL32UTF8\",\"computeCount\":2.0,\"computeModel\":\"ECPU\",\"connectionStrings\":{\"allConnectionStrings\":{\"HIGH\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"MEDIUM\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"LOW\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"TPURGENT\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com\",\"TP\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com\"},\"dedicated\":null,\"high\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com\",\"low\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com\",\"medium\":\"adb.us-ashburn-1.oraclecloud.com:1522/g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com\",\"profiles\":[{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Server\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"High\",\"displayName\":\"ofakepowershelltestadbs_high\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Low\",\"displayName\":\"ofakepowershelltestadbs_low\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Medium\",\"displayName\":\"ofakepowershelltestadbs_medium\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tp\",\"displayName\":\"ofakepowershelltestadbs_tp\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"},{\"consumerGroup\":\"Tpurgent\",\"displayName\":\"ofakepowershelltestadbs_tpurgent\",\"hostFormat\":\"Fqdn\",\"isRegional\":null,\"protocol\":\"TCPS\",\"sessionMode\":\"Direct\",\"syntaxFormat\":\"Long\",\"tlsAuthentication\":\"Mutual\",\"value\":\"(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=zsz2zdb9.adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=g65795d1a5ce1e9_ofakepowershelltestadbs_tpurgent.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))\"}]},\"connectionUrls\":{\"apexUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/ords/apex\",\"databaseTransformsUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/odi/\",\"graphStudioUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/\",\"machineLearningNotebookUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/oml/\",\"mongoDbUrl\":null,\"ordsUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/ords/\",\"sqlDevWebUrl\":\"https://zsz2zdb9.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer\"},\"cpuCoreCount\":null,\"customerContacts\":null,\"dataSafeStatus\":null,\"dataStorageSizeInGbs\":32,\"dataStorageSizeInTbs\":null,\"databaseEdition\":\"EnterpriseEdition\",\"dbVersion\":\"19c\",\"dbWorkload\":\"OLTP\",\"displayName\":\"OFakePowerShellTestAdbs\",\"inMemoryAreaInGbs\":null,\"nextLongTermBackupTimeStamp\":null,\"longTermBackupSchedule\":null,\"isAutoScalingEnabled\":false,\"isAutoScalingForStorageEnabled\":false,\"peerDbIds\":null,\"isLocalDataGuardEnabled\":false,\"isRemoteDataGuardEnabled\":false,\"localDisasterRecoveryType\":\"BackupBased\",\"localStandbyDb\":{\"lagTimeInSeconds\":null,\"lifecycleState\":\"Standby\",\"lifecycleDetails\":null,\"timeDataGuardRoleChanged\":\"2024-07-11T10:46:47.506Z\",\"timeDisasterRecoveryRoleChanged\":\"2024-07-11T10:46:47.506Z\"},\"failedDataRecoveryInSeconds\":null,\"isMtlsConnectionRequired\":false,\"isPreview\":null,\"licenseModel\":\"BringYourOwnLicense\",\"lifecycleDetails\":null,\"provisioningState\":null,\"localAdgAutoFailoverMaxDataLossLimit\":null,\"memoryPerOracleComputeUnitInGbs\":null,\"ncharacterSet\":\"AL16UTF16\",\"ociUrl\":null,\"openMode\":\"ReadWrite\",\"operationsInsightsStatus\":null,\"permissionLevel\":null,\"privateEndpoint\":\"zsz2zdb9.adb.us-ashburn-1.oraclecloud.com\",\"privateEndpointIp\":\"10.0.1.227\",\"privateEndpointLabel\":\"zsz2zdb9\",\"provisionableCpus\":null,\"lifecycleState\":\"Available\",\"role\":null,\"scheduledOperations\":null,\"serviceConsoleUrl\":null,\"sqlWebDeveloperUrl\":null,\"subnetId\":null,\"supportedRegionsToCloneTo\":null,\"timeCreated\":\"2024-07-11T09:43:59.196Z\",\"timeDataGuardRoleChanged\":null,\"timeDeletionOfFreeAutonomousDatabase\":null,\"timeLocalDataGuardEnabled\":\"Thu Jul 11 09:44:23 UTC 2024\",\"timeMaintenanceBegin\":\"2024-07-14T12:00:00.000Z\",\"timeMaintenanceEnd\":\"2024-07-14T14:00:00.000Z\",\"timeOfLastFailover\":null,\"timeOfLastRefresh\":null,\"timeOfLastRefreshPoint\":null,\"timeOfLastSwitchover\":\"Thu Jul 11 10:46:47 UTC 2024\",\"timeReclamationOfFreeAutonomousDatabase\":null,\"usedDataStorageSizeInGbs\":null,\"usedDataStorageSizeInTbs\":null,\"vnetId\":null,\"ocid\":\"ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqaawhqnicickxllrvrtu4m4bzc7q5vewtvyfg55u4rlxha\",\"backupRetentionPeriodInDays\":60},\"location\":null,\"tags\":null,\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/autonomousDatabases/OFakePowerShellTestAdbs\",\"type\":\"Oracle.Database/autonomousDatabases\",\"name\":\"OFakePowerShellTestAdbs\",\"systemData\":null}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..e6ed4ec5f9a7 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Restore-AzOracleAutonomousDatabase.Tests.ps1 @@ -0,0 +1,24 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Restore-AzOracleAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Restore-AzOracleAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Restore-AzOracleAutonomousDatabase' { + It 'RestoreExpanded' { + { + $timeStamp = Get-Date + Restore-AzOracleAutonomousDatabase -NoWait -Name $env.adbsName -ResourceGroupName $env.resourceGroup -Timestamp $timeStamp + } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Update-AzOracleAutonomousDatabase.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Update-AzOracleAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..861695baaaed --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Update-AzOracleAutonomousDatabase.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleAutonomousDatabase' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudExadataInfrastructure.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..0c817b2519aa --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleCloudExadataInfrastructure' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudVMCluster.Tests.ps1 b/src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..82ee92ca3e54 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/Update-AzOracleCloudVMCluster.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleCloudVMCluster' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonString' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaJsonFilePath' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Oracle/Oracle.Autorest/test/env.json b/src/Oracle/Oracle.Autorest/test/env.json new file mode 100644 index 000000000000..35a0709bc355 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/env.json @@ -0,0 +1,39 @@ +{ + "vnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet", + "adbsNCharacterSet": "AL16UTF16", + "exaInfraName": "OFake_PowerShellTestExaInfra", + "exaInfraShape": "Exadata.X9M", + "adbsDatabaseType": "Regular", + "adbsComputeCount": 2.0, + "adbsCharacterSet": "AL32UTF8", + "resourceGroup": "PowerShellTestRg", + "vmClusterDbNodeStorageSizeInGb": 180, + "adbsComputeModel": "ECPU", + "vmClusterCpuCoreCount": 4, + "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated", + "exaInfraComputeCount": 3, + "vmClusterClusterName": "TestVMC", + "vmClusterIsSparseDiskgroupEnabled": false, + "adbsName": "OFakePowerShellTestAdbs", + "vmClusterTimeZone": "UTC", + "SubscriptionId": "00000000-0000-0000-0000-000000000000", + "vmClusterHostName": "host", + "adbsDataStorageInGb": 32, + "zone": [ + "2" + ], + "vmClusterIsLocalBackupEnabled": false, + "adbsDbVersion": "19c", + "vmClusterDataStoragePercentage": 80, + "vmClusterName": "OFake_PowerShellTestVmCluster", + "location": "eastus", + "Tenant": "359af50e-f985-4028-adf5-034a840f32d6", + "vmClusterMemorySizeInGb": 90, + "vmClusterGiVersion": "19.0.0.0", + "exaInfraStorageCount": 3, + "adbsDbWorkload": "OLTP", + "adbsLicenseModel": "BringYourOwnLicense", + "vmClusterDataStorageSizeInTb": 2.0, + "vmClusterLicenseModel": "LicenseIncluded", + "adbsBackupId": "testId12345" +} diff --git a/src/Oracle/Oracle.Autorest/test/loadEnv.ps1 b/src/Oracle/Oracle.Autorest/test/loadEnv.ps1 new file mode 100644 index 000000000000..6a7c385c6b7d --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/loadEnv.ps1 @@ -0,0 +1,29 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/test/utils.ps1 b/src/Oracle/Oracle.Autorest/test/utils.ps1 new file mode 100644 index 000000000000..960e5e5db7ea --- /dev/null +++ b/src/Oracle/Oracle.Autorest/test/utils.ps1 @@ -0,0 +1,164 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +function Start-TestSleep { + [CmdletBinding(DefaultParameterSetName = 'SleepBySeconds')] + param( + [parameter(Mandatory = $true, Position = 0, ParameterSetName = 'SleepBySeconds')] + [ValidateRange(0.0, 2147483.0)] + [double] $Seconds, + + [parameter(Mandatory = $true, ParameterSetName = 'SleepByMilliseconds')] + [ValidateRange('NonNegative')] + [Alias('ms')] + [int] $Milliseconds + ) + + if ($TestMode -ne 'playback') { + switch ($PSCmdlet.ParameterSetName) { + 'SleepBySeconds' { + Start-Sleep -Seconds $Seconds + } + 'SleepByMilliseconds' { + Start-Sleep -Milliseconds $Milliseconds + } + } + } +} + +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + + $resourceGroup = "PowerShellTestRg" + $env.Add("resourceGroup", $resourceGroup) + + $location = "eastus" + $env.Add("location", $location) + + $zone = @("2") + $env.Add("zone", $zone) + + $vnetName = "PSTestVnet" + $vnetId = "/subscriptions/$($env.SubscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + $env.Add("vnetId", $vnetId) + + $subnetName = "delegated" + $subnetId = "/subscriptions/$($env.SubscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + $env.Add("subnetId", $subnetId) + + # Exadata Infra Properties + + $exaInfraName = "OFake_PowerShellTestExaInfra" + $env.Add("exaInfraName", $exaInfraName) + + $exaInfraShape = "Exadata.X9M" + $env.Add("exaInfraShape", $exaInfraShape) + + $exaInfraComputeCount = 3 + $env.Add("exaInfraComputeCount", $exaInfraComputeCount) + + $exaInfraStorageCount = 3 + $env.Add("exaInfraStorageCount", $exaInfraStorageCount) + + # VM Cluster Properties + + $vmClusterName = "OFake_PowerShellTestVmCluster" + $env.Add("vmClusterName", $vmClusterName) + + $vmClusterHostName = "host" + $env.Add("vmClusterHostName", $vmClusterHostName) + + $vmClusterCpuCoreCount = 4 + $env.Add("vmClusterCpuCoreCount", $vmClusterCpuCoreCount) + + $vmClusterGiVersion = "19.0.0.0" + $env.Add("vmClusterGiVersion", $vmClusterGiVersion) + + $vmClusterLicenseModel = "LicenseIncluded" + $env.Add("vmClusterLicenseModel", $vmClusterLicenseModel) + + $vmClusterClusterName = "TestVMC" + $env.Add("vmClusterClusterName", $vmClusterClusterName) + + $vmClusterMemorySizeInGb = 90 + $env.Add("vmClusterMemorySizeInGb", $vmClusterMemorySizeInGb) + + $vmClusterDbNodeStorageSizeInGb = 180 + $env.Add("vmClusterDbNodeStorageSizeInGb", $vmClusterDbNodeStorageSizeInGb) + + $vmClusterDataStorageSizeInTb = 2.0 + $env.Add("vmClusterDataStorageSizeInTb", $vmClusterDataStorageSizeInTb) + + $vmClusterDataStoragePercentage = 80 + $env.Add("vmClusterDataStoragePercentage", $vmClusterDataStoragePercentage) + + $vmClusterIsLocalBackupEnabled = $false + $env.Add("vmClusterIsLocalBackupEnabled", $vmClusterIsLocalBackupEnabled) + + $vmClusterIsSparseDiskgroupEnabled = $false + $env.Add("vmClusterIsSparseDiskgroupEnabled", $vmClusterIsSparseDiskgroupEnabled) + + $vmClusterTimeZone = "UTC" + $env.Add("vmClusterTimeZone", $vmClusterTimeZone) + + # ADBS Properties + + $adbsName = "OFakePowerShellTestAdbs" + $env.Add("adbsName", $adbsName) + + $adbsDbWorkload = "OLTP" + $env.Add("adbsDbWorkload", $adbsDbWorkload) + + $adbsComputeCount = 2.0 + $env.Add("adbsComputeCount", $adbsComputeCount) + + $adbsComputeModel = "ECPU" + $env.Add("adbsComputeModel", $adbsComputeModel) + + $adbsDbVersion = "19c" + $env.Add("adbsDbVersion", $adbsDbVersion) + + $adbsDataStorageInGb = 32 + $env.Add("adbsDataStorageInGb", $adbsDataStorageInGb) + + $adbsLicenseModel = "BringYourOwnLicense" + $env.Add("adbsLicenseModel", $adbsLicenseModel) + + $adbsDatabaseType = "Regular" + $env.Add("adbsDatabaseType", $adbsDatabaseType) + + $adbsCharacterSet = "AL32UTF8" + $env.Add("adbsCharacterSet", $adbsCharacterSet) + + $adbsNCharacterSet = "AL16UTF16" + $env.Add("adbsNCharacterSet", $adbsNCharacterSet) + + $adbsBackupId = "testId12345" + $env.Add("adbsBackupId", $adbsBackupId) + + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} + diff --git a/src/Oracle/Oracle.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/Oracle/Oracle.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 @@ -0,0 +1,7 @@ +param() +if ($env:AzPSAutorestTestPlaybackMode) { + $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' + . ($loadEnvPath) + return $env.SubscriptionId +} +return (Get-AzContext).Subscription.Id \ No newline at end of file diff --git a/src/Oracle/Oracle.Autorest/utils/Unprotect-SecureString.ps1 b/src/Oracle/Oracle.Autorest/utils/Unprotect-SecureString.ps1 new file mode 100644 index 000000000000..cb05b51a6220 --- /dev/null +++ b/src/Oracle/Oracle.Autorest/utils/Unprotect-SecureString.ps1 @@ -0,0 +1,16 @@ +#This script converts securestring to plaintext + +param( + [Parameter(Mandatory, ValueFromPipeline)] + [System.Security.SecureString] + ${SecureString} +) + +$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) +try { + $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) +} finally { + [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr) +} + +return $plaintext \ No newline at end of file diff --git a/src/Oracle/Oracle.sln b/src/Oracle/Oracle.sln new file mode 100644 index 000000000000..d1326d665403 --- /dev/null +++ b/src/Oracle/Oracle.sln @@ -0,0 +1,74 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Accounts", "Accounts", "{B93A569C-FC5D-49D9-B85D-6613B54CB5AF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{10629025-D047-43F5-B405-3FE95F3DDEA1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{39E8A1F7-1E0A-4381-AEB0-CEF933AFA4E1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{73D91E3E-31FB-4A4F-813A-6E53226C51E4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{E20D3B01-2C66-4D7D-9449-30BEF8137336}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{468AB99C-6885-42CD-B487-336695EF8C59}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{B5953A4E-4C9E-4228-97C9-57D065EF5BF6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Oracle", "Oracle\Oracle.csproj", "{95866618-494F-4D82-901E-257FE6E092E0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Oracle", "Oracle.Autorest\Az.Oracle.csproj", "{79ACF9B7-7F66-4812-9C70-0DBC59885AD7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {10629025-D047-43F5-B405-3FE95F3DDEA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10629025-D047-43F5-B405-3FE95F3DDEA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10629025-D047-43F5-B405-3FE95F3DDEA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10629025-D047-43F5-B405-3FE95F3DDEA1}.Release|Any CPU.Build.0 = Release|Any CPU + {39E8A1F7-1E0A-4381-AEB0-CEF933AFA4E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39E8A1F7-1E0A-4381-AEB0-CEF933AFA4E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39E8A1F7-1E0A-4381-AEB0-CEF933AFA4E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39E8A1F7-1E0A-4381-AEB0-CEF933AFA4E1}.Release|Any CPU.Build.0 = Release|Any CPU + {73D91E3E-31FB-4A4F-813A-6E53226C51E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73D91E3E-31FB-4A4F-813A-6E53226C51E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73D91E3E-31FB-4A4F-813A-6E53226C51E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73D91E3E-31FB-4A4F-813A-6E53226C51E4}.Release|Any CPU.Build.0 = Release|Any CPU + {E20D3B01-2C66-4D7D-9449-30BEF8137336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E20D3B01-2C66-4D7D-9449-30BEF8137336}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E20D3B01-2C66-4D7D-9449-30BEF8137336}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E20D3B01-2C66-4D7D-9449-30BEF8137336}.Release|Any CPU.Build.0 = Release|Any CPU + {468AB99C-6885-42CD-B487-336695EF8C59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {468AB99C-6885-42CD-B487-336695EF8C59}.Debug|Any CPU.Build.0 = Debug|Any CPU + {468AB99C-6885-42CD-B487-336695EF8C59}.Release|Any CPU.ActiveCfg = Release|Any CPU + {468AB99C-6885-42CD-B487-336695EF8C59}.Release|Any CPU.Build.0 = Release|Any CPU + {B5953A4E-4C9E-4228-97C9-57D065EF5BF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5953A4E-4C9E-4228-97C9-57D065EF5BF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5953A4E-4C9E-4228-97C9-57D065EF5BF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5953A4E-4C9E-4228-97C9-57D065EF5BF6}.Release|Any CPU.Build.0 = Release|Any CPU + {95866618-494F-4D82-901E-257FE6E092E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95866618-494F-4D82-901E-257FE6E092E0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95866618-494F-4D82-901E-257FE6E092E0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95866618-494F-4D82-901E-257FE6E092E0}.Release|Any CPU.Build.0 = Release|Any CPU + {79ACF9B7-7F66-4812-9C70-0DBC59885AD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {79ACF9B7-7F66-4812-9C70-0DBC59885AD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {79ACF9B7-7F66-4812-9C70-0DBC59885AD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {79ACF9B7-7F66-4812-9C70-0DBC59885AD7}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {10629025-D047-43F5-B405-3FE95F3DDEA1} = {B93A569C-FC5D-49D9-B85D-6613B54CB5AF} + {39E8A1F7-1E0A-4381-AEB0-CEF933AFA4E1} = {B93A569C-FC5D-49D9-B85D-6613B54CB5AF} + {73D91E3E-31FB-4A4F-813A-6E53226C51E4} = {B93A569C-FC5D-49D9-B85D-6613B54CB5AF} + {E20D3B01-2C66-4D7D-9449-30BEF8137336} = {B93A569C-FC5D-49D9-B85D-6613B54CB5AF} + {468AB99C-6885-42CD-B487-336695EF8C59} = {B93A569C-FC5D-49D9-B85D-6613B54CB5AF} + {B5953A4E-4C9E-4228-97C9-57D065EF5BF6} = {B93A569C-FC5D-49D9-B85D-6613B54CB5AF} + EndGlobalSection +EndGlobal diff --git a/src/Oracle/Oracle/Az.Oracle.psd1 b/src/Oracle/Oracle/Az.Oracle.psd1 new file mode 100644 index 000000000000..23ee849af7d9 --- /dev/null +++ b/src/Oracle/Oracle/Az.Oracle.psd1 @@ -0,0 +1,154 @@ +# +# Module manifest for module 'Az.Oracle' +# +# Generated by: Microsoft Corporation +# +# Generated on: 7/17/2024 +# + +@{ + +# Script module or binary module file associated with this manifest. +# RootModule = '' + +# Version number of this module. +ModuleVersion = '0.1.0' + +# Supported PSEditions +CompatiblePSEditions = 'Core', 'Desktop' + +# ID used to uniquely identify this module +GUID = 'accceef6-8113-453a-a31c-4f2ce57893d6' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = 'Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'Microsoft Azure PowerShell: {ModuleNamePlaceHolder} cmdlets' + +# Minimum version of the PowerShell engine required by this module +PowerShellVersion = '5.1' + +# Name of the PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +DotNetFrameworkVersion = '4.7.2' + +# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# ClrVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '3.0.2'; }) + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = 'Oracle.Autorest/bin/Az.Oracle.private.dll' + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = 'Oracle.Autorest/Az.Oracle.format.ps1xml' + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +NestedModules = @('Oracle.Autorest/Az.Oracle.psm1') + +# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. +FunctionsToExport = 'Add-AzOracleCloudVMClusterVM', 'Get-AzOracleAutonomousDatabase', + 'Get-AzOracleAutonomousDatabaseBackup', + 'Get-AzOracleAutonomousDatabaseCharacterSet', + 'Get-AzOracleAutonomousDatabaseNationalCharacterSet', + 'Get-AzOracleAutonomousDatabaseVersion', + 'Get-AzOracleCloudExadataInfrastructure', + 'Get-AzOracleCloudVMCluster', 'Get-AzOracleDbNode', + 'Get-AzOracleDbServer', 'Get-AzOracleDbSystemShape', + 'Get-AzOracleDnsPrivateView', 'Get-AzOracleDnsPrivateZone', + 'Get-AzOracleGiVersion', 'Invoke-AzOracleActionDbNode', + 'Invoke-AzOracleSwitchoverAutonomousDatabase', + 'New-AzOracleAutonomousDatabase', + 'New-AzOracleAutonomousDatabaseBackup', + 'New-AzOracleCloudExadataInfrastructure', + 'New-AzOracleCloudVMCluster', 'New-AzOracleCustomerContactObject', + 'New-AzOracleNsgCidrObject', 'Remove-AzOracleAutonomousDatabase', + 'Remove-AzOracleAutonomousDatabaseBackup', + 'Remove-AzOracleCloudExadataInfrastructure', + 'Remove-AzOracleCloudVMCluster', 'Remove-AzOracleCloudVMClusterVM', + 'Restore-AzOracleAutonomousDatabase', + 'Update-AzOracleAutonomousDatabase', + 'Update-AzOracleCloudExadataInfrastructure', + 'Update-AzOracleCloudVMCluster' + +# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. +CmdletsToExport = @() + +# Variables to export from this module +# VariablesToExport = @() + +# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. +AliasesToExport = @() + +# DSC resources to export from this module +# DscResourcesToExport = @() + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', '{ModuleNamePlaceHolder}' + + # A URL to the license for this module. + LicenseUri = 'https://aka.ms/azps-license' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Azure/azure-powershell' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + +} # End of PrivateData hashtable + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +} + diff --git a/src/Oracle/Oracle/ChangeLog.md b/src/Oracle/Oracle/ChangeLog.md new file mode 100644 index 000000000000..847aa8b5f4e4 --- /dev/null +++ b/src/Oracle/Oracle/ChangeLog.md @@ -0,0 +1,24 @@ + +## Upcoming Release + +## Version 0.1.0 +* First preview release for module Az.Oracle + diff --git a/src/Oracle/Oracle/Oracle.csproj b/src/Oracle/Oracle/Oracle.csproj new file mode 100644 index 000000000000..a8d3e7eea2a4 --- /dev/null +++ b/src/Oracle/Oracle/Oracle.csproj @@ -0,0 +1,28 @@ + + + + + + + Oracle + + + + netstandard2.0 + $(AzAssemblyPrefix)$(PsModuleName) + $(AzAssemblyPrefix)$(PsModuleName) + true + false + $(RepoArtifacts)$(Configuration)\Az.$(PsModuleName)\ + $(OutputPath) + + + + + + + + + + + diff --git a/src/Oracle/Oracle/Properties/AssemblyInfo.cs b/src/Oracle/Oracle/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..abf5ff976c26 --- /dev/null +++ b/src/Oracle/Oracle/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Microsoft Azure Powershell - Oracle")] +[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)] +[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)] +[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)] + +[assembly: ComVisible(false)] +[assembly: CLSCompliant(false)] +[assembly: Guid("fba0df65-db03-40b2-8c2c-fe3d1d3bfcf8")] +[assembly: AssemblyVersion("0.1.0")] +[assembly: AssemblyFileVersion("0.1.0")] diff --git a/src/Oracle/Oracle/help/Add-AzOracleCloudVMClusterVM.md b/src/Oracle/Oracle/help/Add-AzOracleCloudVMClusterVM.md new file mode 100644 index 000000000000..e8f51ff80d78 --- /dev/null +++ b/src/Oracle/Oracle/help/Add-AzOracleCloudVMClusterVM.md @@ -0,0 +1,275 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/add-azoraclecloudvmclustervm +schema: 2.0.0 +--- + +# Add-AzOracleCloudVMClusterVM + +## SYNOPSIS +Add VMs to the VM Cluster + +## SYNTAX + +### AddExpanded (Default) +``` +Add-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] -DbServer [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### AddViaJsonString +``` +Add-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### AddViaJsonFilePath +``` +Add-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### AddViaIdentityExpanded +``` +Add-AzOracleCloudVMClusterVM -InputObject -DbServer [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Add VMs to the VM Cluster + +## EXAMPLES + +### Example 1: Add a VM to a Cloud VM Cluster resource +```powershell +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToAdd = @($dbServerOcid1) + +Add-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName $resourceGroup -DbServer $dbServersToAdd +``` + +Add a VM to a Cloud VM Cluster resource. +For more information, execute `Get-Help Add-AzOracleCloudVMClusterVM`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: AddExpanded, AddViaJsonString, AddViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +Db servers ocids + +```yaml +Type: System.String[] +Parameter Sets: AddExpanded, AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Add operation + +```yaml +Type: System.String +Parameter Sets: AddViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Add operation + +```yaml +Type: System.String +Parameter Sets: AddViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: AddExpanded, AddViaJsonString, AddViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: AddExpanded, AddViaJsonString, AddViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Az.Oracle.md b/src/Oracle/Oracle/help/Az.Oracle.md new file mode 100644 index 000000000000..389ecd227403 --- /dev/null +++ b/src/Oracle/Oracle/help/Az.Oracle.md @@ -0,0 +1,106 @@ +--- +Module Name: Az.Oracle +Module Guid: 8c6ec918-2897-4019-8ecd-4f2324055811 +Download Help Link: https://learn.microsoft.com/powershell/module/az.oracle +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.Oracle Module +## Description +Microsoft Azure PowerShell: Oracle cmdlets + +## Az.Oracle Cmdlets +### [Add-AzOracleCloudVMClusterVM](Add-AzOracleCloudVMClusterVM.md) +Add VMs to the VM Cluster + +### [Get-AzOracleAutonomousDatabase](Get-AzOracleAutonomousDatabase.md) +Get a AutonomousDatabase + +### [Get-AzOracleAutonomousDatabaseBackup](Get-AzOracleAutonomousDatabaseBackup.md) +Get a AutonomousDatabaseBackup + +### [Get-AzOracleAutonomousDatabaseCharacterSet](Get-AzOracleAutonomousDatabaseCharacterSet.md) +Get a AutonomousDatabaseCharacterSet + +### [Get-AzOracleAutonomousDatabaseNationalCharacterSet](Get-AzOracleAutonomousDatabaseNationalCharacterSet.md) +Get a AutonomousDatabaseNationalCharacterSet + +### [Get-AzOracleAutonomousDatabaseVersion](Get-AzOracleAutonomousDatabaseVersion.md) +Get a AutonomousDbVersion + +### [Get-AzOracleCloudExadataInfrastructure](Get-AzOracleCloudExadataInfrastructure.md) +Get a CloudExadataInfrastructure + +### [Get-AzOracleCloudVMCluster](Get-AzOracleCloudVMCluster.md) +Get a CloudVmCluster + +### [Get-AzOracleDbNode](Get-AzOracleDbNode.md) +Get a DbNode + +### [Get-AzOracleDbServer](Get-AzOracleDbServer.md) +Get a DbServer + +### [Get-AzOracleDbSystemShape](Get-AzOracleDbSystemShape.md) +Get a DbSystemShape + +### [Get-AzOracleDnsPrivateView](Get-AzOracleDnsPrivateView.md) +Get a DnsPrivateView + +### [Get-AzOracleDnsPrivateZone](Get-AzOracleDnsPrivateZone.md) +Get a DnsPrivateZone + +### [Get-AzOracleGiVersion](Get-AzOracleGiVersion.md) +Get a GiVersion + +### [Invoke-AzOracleActionDbNode](Invoke-AzOracleActionDbNode.md) +VM actions on DbNode of VM Cluster by the provided filter + +### [Invoke-AzOracleSwitchoverAutonomousDatabase](Invoke-AzOracleSwitchoverAutonomousDatabase.md) +Perform switchover action on Autonomous Database + +### [New-AzOracleAutonomousDatabase](New-AzOracleAutonomousDatabase.md) +Create a AutonomousDatabase + +### [New-AzOracleAutonomousDatabaseBackup](New-AzOracleAutonomousDatabaseBackup.md) +Create a AutonomousDatabaseBackup + +### [New-AzOracleCloudExadataInfrastructure](New-AzOracleCloudExadataInfrastructure.md) +Create a CloudExadataInfrastructure + +### [New-AzOracleCloudVMCluster](New-AzOracleCloudVMCluster.md) +Create a CloudVmCluster + +### [New-AzOracleCustomerContactObject](New-AzOracleCustomerContactObject.md) +Create an in-memory object for CustomerContact. + +### [New-AzOracleNsgCidrObject](New-AzOracleNsgCidrObject.md) +Create an in-memory object for NsgCidr. + +### [Remove-AzOracleAutonomousDatabase](Remove-AzOracleAutonomousDatabase.md) +Delete a AutonomousDatabase + +### [Remove-AzOracleAutonomousDatabaseBackup](Remove-AzOracleAutonomousDatabaseBackup.md) +Delete a AutonomousDatabaseBackup + +### [Remove-AzOracleCloudExadataInfrastructure](Remove-AzOracleCloudExadataInfrastructure.md) +Delete a CloudExadataInfrastructure + +### [Remove-AzOracleCloudVMCluster](Remove-AzOracleCloudVMCluster.md) +Delete a CloudVmCluster + +### [Remove-AzOracleCloudVMClusterVM](Remove-AzOracleCloudVMClusterVM.md) +Remove VMs from the VM Cluster + +### [Restore-AzOracleAutonomousDatabase](Restore-AzOracleAutonomousDatabase.md) +Restores an Autonomous Database based on the provided request parameters. + +### [Update-AzOracleAutonomousDatabase](Update-AzOracleAutonomousDatabase.md) +Update a AutonomousDatabase + +### [Update-AzOracleCloudExadataInfrastructure](Update-AzOracleCloudExadataInfrastructure.md) +Update a CloudExadataInfrastructure + +### [Update-AzOracleCloudVMCluster](Update-AzOracleCloudVMCluster.md) +Update a CloudVmCluster + diff --git a/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..38abc58baf40 --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabase.md @@ -0,0 +1,216 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabase + +## SYNOPSIS +Get a AutonomousDatabase + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabase [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### List1 +``` +Get-AzOracleAutonomousDatabase -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabase -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabase + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database resources +```powershell +Get-AzOracleAutonomousDatabase +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashbur + n-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subn + ets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:19:26 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Get an Autonomous Database resource by name and resource group name. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..4e4e1585972f --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,202 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasebackup +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseBackup + +## SYNOPSIS +Get a AutonomousDatabaseBackup + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityAutonomousDatabase +``` +Get-AzOracleAutonomousDatabaseBackup -Adbbackupid -AutonomousDatabaseInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseBackup -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database Backups for an Autonomous Database resource +```powershell +Get-AzOracleAutonomousDatabaseBackup -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +Jul 06, 2024 01:54:13 UTC PowerShellTestRg +Jul 05, 2024 15:26:01 UTC PowerShellTestRg +autonomousdatabasebackup20240705141147 PowerShellTestRg +autonomousdatabasebackup20240705135809 PowerShellTestRg +Jul 04, 2024 12:00:52 UTC PowerShellTestRg +``` + +Get a list of the Autonomous Database Backups for an Autonomous Database resource. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseBackup` + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: GetViaIdentityAutonomousDatabase, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousDatabaseInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityAutonomousDatabase +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseCharacterSet.md b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseCharacterSet.md new file mode 100644 index 000000000000..a7ecfa3612ca --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseCharacterSet.md @@ -0,0 +1,181 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasecharacterset +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseCharacterSet + +## SYNOPSIS +Get a AutonomousDatabaseCharacterSet + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseCharacterSet -Location [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleAutonomousDatabaseCharacterSet -Adbscharsetname -LocationInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseCharacterSet -Adbscharsetname -Location + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseCharacterSet -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseCharacterSet + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database Character Sets by location +```powershell +(Get-AzOracleAutonomousDatabaseCharacterSet -Location "eastus").CharacterSet +``` + +```output +AL32UTF8 +AR8ADOS710 +AR8ADOS720 +``` + +Get a list of the Autonomous Database Character Sets by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseCharacterSet`. + +## PARAMETERS + +### -Adbscharsetname +AutonomousDatabaseCharacterSet name + +```yaml +Type: System.String +Parameter Sets: GetViaIdentityLocation, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseCharacterSet + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md new file mode 100644 index 000000000000..17c02a6ba5f9 --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseNationalCharacterSet.md @@ -0,0 +1,181 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabasenationalcharacterset +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseNationalCharacterSet + +## SYNOPSIS +Get a AutonomousDatabaseNationalCharacterSet + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -Adbsncharsetname + -LocationInputObject [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -Adbsncharsetname -Location + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseNationalCharacterSet -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseNationalCharacterSet + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database National Character Sets by location +```powershell +(Get-AzOracleAutonomousDatabaseNationalCharacterSet -Location "eastus").CharacterSet +``` + +```output +AL16UTF16 +UTF8 +``` + +Get a list of the Autonomous Database National Character Sets by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseNationalCharacterSet`. + +## PARAMETERS + +### -Adbsncharsetname +AutonomousDatabaseNationalCharacterSets name + +```yaml +Type: System.String +Parameter Sets: GetViaIdentityLocation, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseNationalCharacterSet + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseVersion.md b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseVersion.md new file mode 100644 index 000000000000..05c17f0047de --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleAutonomousDatabaseVersion.md @@ -0,0 +1,183 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracleautonomousdatabaseversion +schema: 2.0.0 +--- + +# Get-AzOracleAutonomousDatabaseVersion + +## SYNOPSIS +Get a AutonomousDbVersion + +## SYNTAX + +### List (Default) +``` +Get-AzOracleAutonomousDatabaseVersion -Location [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleAutonomousDatabaseVersion -Autonomousdbversionsname -LocationInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleAutonomousDatabaseVersion -Autonomousdbversionsname -Location + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentity +``` +Get-AzOracleAutonomousDatabaseVersion -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a AutonomousDbVersion + +## EXAMPLES + +### Example 1: Get a list of the Autonomous Database Versions by location +```powershell +Get-AzOracleAutonomousDatabaseVersion -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +19c +19c +19c +``` + +Get a list of the Autonomous Database Versions by location. +For more information, execute `Get-Help Get-AzOracleAutonomousDatabaseVersion`. + +## PARAMETERS + +### -Autonomousdbversionsname +AutonomousDbVersion name + +```yaml +Type: System.String +Parameter Sets: GetViaIdentityLocation, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDbVersion + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle/help/Get-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..e4d9f4c1665a --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,203 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# Get-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Get a CloudExadataInfrastructure + +## SYNTAX + +### List (Default) +``` +Get-AzOracleCloudExadataInfrastructure [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### List1 +``` +Get-AzOracleCloudExadataInfrastructure -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleCloudExadataInfrastructure -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Get a list of the Cloud Exadata Infrastructure resources +```powershell +Get-AzOracleCloudExadataInfrastructure +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +eastus OFake_PowerShellTestExaInfra 04/07/2024 13:20:00 example@oracle.com User 06/07/2024 11:04:06 857ad006-4380-4712-ba4c-22f7c64d84e7 Application PowerShellTestRg +eastus DemoExaInfra 05/07/2024 08:20:01 example@oracle.com User 06/07/2024 11:04:07 857ad006-4380-4712-ba4c-22f7c64d84e7 Application SDKTestRG +germanywestcentral OFake_ppratees_0216_2 16/02/2024 20:24:39 example@oracle.com User 06/07/2024 11:03:57 857ad006-4380-4712-ba4c-22f7c64d84e7 Application ObsTestingFra +``` + +Get a list of the Cloud Exadata Infrastructure resources. +For more information, execute `Get-Help Get-AzOracleCloudExadataInfrastructure`. + +### Example 2: Get a Cloud Exadata Infrastructure resource by name and resource group name +```powershell +Get-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +... +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbu + uk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsa + e5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 08:49:18 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Get a Cloud Exadata Infrastructure resource by name. +For more information, execute `Get-Help Get-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleCloudVMCluster.md b/src/Oracle/Oracle/help/Get-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..e063eefc06fe --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleCloudVMCluster.md @@ -0,0 +1,201 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# Get-AzOracleCloudVMCluster + +## SYNOPSIS +Get a CloudVmCluster + +## SYNTAX + +### List (Default) +``` +Get-AzOracleCloudVMCluster [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### List1 +``` +Get-AzOracleCloudVMCluster -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleCloudVMCluster -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a CloudVmCluster + +## EXAMPLES + +### Example 1: Get a list of the Cloud VM Cluster resources +```powershell +Get-AzOracleCloudVMCluster +``` + +```output +... +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-group + s/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?regio + n=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa xxx} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/sub + nets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:04:17 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +SystemVersion : +Tag : { + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Get a Cloud VM Cluster resource by name and resource group name. +For more information, execute `Get-Help Get-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleDbNode.md b/src/Oracle/Oracle/help/Get-AzOracleDbNode.md new file mode 100644 index 000000000000..273eb176358d --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleDbNode.md @@ -0,0 +1,198 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbnode +schema: 2.0.0 +--- + +# Get-AzOracleDbNode + +## SYNOPSIS +Get a DbNode + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDbNode -Cloudvmclustername -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleDbNode -Cloudvmclustername -Ocid -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityCloudVMCluster +``` +Get-AzOracleDbNode -Ocid -CloudVMClusterInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDbNode -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a DbNode + +## EXAMPLES + +### Example 1: Get a list of the Database Nodes for a Cloud VM Cluster resource +```powershell +Get-AzOracleDbNode -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa PowerShellTestRg +ocid1.dbnode.oc1.iad.anuwcljrnirvylqaqm24luvmhsaaz2wtiq3ggddpsemx6gn66vff5rulsgnq PowerShellTestRg +``` + +Get a list of the Database Nodes for a Cloud VM Cluster resource. +For more information, execute `Get-Help Get-AzOracleDbNode` + +## PARAMETERS + +### -CloudVMClusterInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityCloudVMCluster +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DbNode OCID. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCloudVMCluster +Aliases: Dbnodeocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleDbServer.md b/src/Oracle/Oracle/help/Get-AzOracleDbServer.md new file mode 100644 index 000000000000..d4e79d4676db --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleDbServer.md @@ -0,0 +1,200 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbserver +schema: 2.0.0 +--- + +# Get-AzOracleDbServer + +## SYNOPSIS +Get a DbServer + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDbServer -Cloudexadatainfrastructurename -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### Get +``` +Get-AzOracleDbServer -Cloudexadatainfrastructurename -Ocid -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### GetViaIdentityCloudExadataInfrastructure +``` +Get-AzOracleDbServer -Ocid -CloudExadataInfrastructureInputObject + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDbServer -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a DbServer + +## EXAMPLES + +### Example 1: Get a list of the Database Servers for a Cloud Exadata Infrastructure resource +```powershell +Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +dbServer-2 PowerShellTestRg +dbServer-3 PowerShellTestRg +dbServer-1 PowerShellTestRg +``` + +Get a list of the Database Servers for a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Get-AzOracleDbServer`. + +## PARAMETERS + +### -CloudExadataInfrastructureInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityCloudExadataInfrastructure +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudexadatainfrastructurename +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DbServer OCID. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityCloudExadataInfrastructure +Aliases: Dbserverocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbServer + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleDbSystemShape.md b/src/Oracle/Oracle/help/Get-AzOracleDbSystemShape.md new file mode 100644 index 000000000000..073a17507d12 --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleDbSystemShape.md @@ -0,0 +1,207 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoracledbsystemshape +schema: 2.0.0 +--- + +# Get-AzOracleDbSystemShape + +## SYNOPSIS +Get a DbSystemShape + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDbSystemShape -Location [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleDbSystemShape -Location -Name [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleDbSystemShape -Name -LocationInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDbSystemShape -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a DbSystemShape + +## EXAMPLES + +### Example 1: Get a list of the Database System Shapes by location +```powershell +Get-AzOracleDbSystemShape -Location "eastus" +``` + +```output +AvailableCoreCount : 0 +AvailableCoreCountPerNode : 126 +AvailableDataStorageInTb : 63 +AvailableDataStoragePerServerInTb : +AvailableDbNodePerNodeInGb : 2243 +AvailableDbNodeStorageInGb : +AvailableMemoryInGb : +AvailableMemoryPerNodeInGb : 1390 +CoreCountIncrement : +Id : /subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/eastus/dbSystemShapes/Exadata.X9M +MaxStorageCount : +MaximumNodeCount : 32 +MinCoreCountPerNode : 0 +MinDataStorageInTb : 2 +MinDbNodeStoragePerNodeInGb : 60 +MinMemoryPerNodeInGb : 30 +MinStorageCount : +MinimumCoreCount : 0 +MinimumNodeCount : 2 +Name : Exadata.X9M +ResourceGroupName : +RuntimeMinimumCoreCount : +ShapeFamily : EXADATA +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : Oracle.Database/Locations/dbSystemShapes +``` + +Get a list of the Database System Shapes by location. +For more information, execute `Get-Help Get-AzOracleDbSystemShape`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +DbSystemShape name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Dbsystemshapename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbSystemShape + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleDnsPrivateView.md b/src/Oracle/Oracle/help/Get-AzOracleDnsPrivateView.md new file mode 100644 index 000000000000..3d64753504dc --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleDnsPrivateView.md @@ -0,0 +1,182 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivateview +schema: 2.0.0 +--- + +# Get-AzOracleDnsPrivateView + +## SYNOPSIS +Get a DnsPrivateView + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDnsPrivateView -Location [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleDnsPrivateView -Location -Ocid [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleDnsPrivateView -Ocid -LocationInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDnsPrivateView -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a DnsPrivateView + +## EXAMPLES + +### Example 1: Get a list of the DNS Private Views by location +```powershell +Get-AzOracleDnsPrivateView -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +ocid1.dnsview.oc1.iad.aaaaaaaaytqscqgo3vowvligvkeaiqozwywcbkm336keyzz34xiorgfximza +ocid1.dnsview.oc1.iad.aaaaaaaalf3jpv4bmwdg6nxw7ciudrb3smln6a46h7asgrwoironcxuoslea +ocid1.dnsview.oc1.iad.aaaaaaaags4sek6p7ocgs5sjarfm26dgmz23yegxxwqk4aowebismrbbgm6q +``` + +Get a list of the DNS Private Views by location. +For more information, execute `Get-Help Get-AzOracleDnsPrivateView`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DnsPrivateView OCID + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Dnsprivateviewocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateView + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleDnsPrivateZone.md b/src/Oracle/Oracle/help/Get-AzOracleDnsPrivateZone.md new file mode 100644 index 000000000000..1026a0b3471b --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleDnsPrivateZone.md @@ -0,0 +1,182 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclednsprivatezone +schema: 2.0.0 +--- + +# Get-AzOracleDnsPrivateZone + +## SYNOPSIS +Get a DnsPrivateZone + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDnsPrivateZone -Location [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleDnsPrivateZone -Location -Name [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleDnsPrivateZone -Name -LocationInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDnsPrivateZone -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a DnsPrivateZone + +## EXAMPLES + +### Example 1: Get a list of the DNS Private Zones by location +```powershell +Get-AzOracleDnsPrivateZone -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +byui3zo3.ocidelegated.ocipstestvnet.adb.us-ashburn-1.oraclevcn.com +byui3zo3.adb.us-ashburn-1.oraclevcn.com +byui3zo3.adbapps.us-ashburn-1.oraclevcn.com +``` + +Get a list of the DNS Private Zones by location. +For more information, execute `Get-Help Get-AzOracleDnsPrivateZone`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +DnsPrivateZone name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Dnsprivatezonename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDnsPrivateZone + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Get-AzOracleGiVersion.md b/src/Oracle/Oracle/help/Get-AzOracleGiVersion.md new file mode 100644 index 000000000000..79fb49dba22f --- /dev/null +++ b/src/Oracle/Oracle/help/Get-AzOracleGiVersion.md @@ -0,0 +1,181 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/get-azoraclegiversion +schema: 2.0.0 +--- + +# Get-AzOracleGiVersion + +## SYNOPSIS +Get a GiVersion + +## SYNTAX + +### List (Default) +``` +Get-AzOracleGiVersion -Location [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### Get +``` +Get-AzOracleGiVersion -Location -Name [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] +``` + +### GetViaIdentityLocation +``` +Get-AzOracleGiVersion -Name -LocationInputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleGiVersion -InputObject [-DefaultProfile ] + [-ProgressAction ] [] +``` + +## DESCRIPTION +Get a GiVersion + +## EXAMPLES + +### Example 1: Get a list of the Grid Infrastructure Versions by location +```powershell +Get-AzOracleGiVersion -Location "eastus" +``` + +```output +Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType ResourceGroupName +---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- ----------------- +19.0.0.0 +23.0.0.0 +``` + +Get a list of the Grid Infrastructure Versions by location. +For more information, execute `Get-Help Get-AzOracleGiVersion`. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: GetViaIdentityLocation +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +GiVersion name + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentityLocation +Aliases: Giversionname + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IGiVersion + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Invoke-AzOracleActionDbNode.md b/src/Oracle/Oracle/help/Invoke-AzOracleActionDbNode.md new file mode 100644 index 000000000000..40efc548ab6c --- /dev/null +++ b/src/Oracle/Oracle/help/Invoke-AzOracleActionDbNode.md @@ -0,0 +1,402 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleactiondbnode +schema: 2.0.0 +--- + +# Invoke-AzOracleActionDbNode + +## SYNOPSIS +VM actions on DbNode of VM Cluster by the provided filter + +## SYNTAX + +### ActionExpanded (Default) +``` +Invoke-AzOracleActionDbNode -Cloudvmclustername -Dbnodeocid -ResourceGroupName + [-SubscriptionId ] -Action [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### ActionViaJsonString +``` +Invoke-AzOracleActionDbNode -Cloudvmclustername -Dbnodeocid -ResourceGroupName + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### ActionViaJsonFilePath +``` +Invoke-AzOracleActionDbNode -Cloudvmclustername -Dbnodeocid -ResourceGroupName + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### ActionViaIdentityCloudVMClusterExpanded +``` +Invoke-AzOracleActionDbNode -Dbnodeocid -CloudVMClusterInputObject -Action + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### ActionViaIdentityExpanded +``` +Invoke-AzOracleActionDbNode -InputObject -Action [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +VM actions on DbNode of VM Cluster by the provided filter + +## EXAMPLES + +### Example 1: Stop a VM in a Cloud VM Cluster resource +```powershell +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$stopActionName = "Stop" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $stopActionName +``` + +```output +AdditionalDetail : +BackupIPId : ocid1.privateIp.fake.2.1 +BackupVnic2Id : ocid1.vnic.fake.2.1 +BackupVnicId : +CpuCoreCount : 2 +DbServerId : ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq +DbSystemId : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +FaultDomain : +HostIPId : ocid1.privateIp.fake.1.1 +Hostname : host-wq5t62 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz + 22lazevdaoiye7bh4iy2nwfa +LifecycleDetail : +LifecycleState : +MaintenanceType : +MemorySizeInGb : 45 +Name : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +Ocid : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +ProvisioningState : Stopping +ResourceGroupName : PowerShellTestRg +SoftwareStorageSizeInGb : +StorageSizeInGb : 90 +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TimeCreated : 04/07/2024 16:09:39 +TimeMaintenanceWindowEnd : +TimeMaintenanceWindowStart : +Type : Oracle.Database/cloudVmClusters/dbNodes +Vnic2Id : ocid1.vnic.fake.1.1 +VnicId : +``` + +Stop a VM in a Cloud VM Cluster resource. +For more information, execute `Get-Help Invoke-AzOracleActionDbNode`. + +### Example 2: Start a VM in a Cloud VM Cluster resource +```powershell +$vmClusterName = "OFake_PowerShellTestVmCluster" +$resourceGroup = "PowerShellTestRg" +$startActionName = "Start" + +$dbNodeList = Get-AzOracleDbNode -Cloudvmclustername $vmClusterName -ResourceGroupName $resourceGroup +$dbNodeOcid1 = $dbNodeList[0].Name + +Invoke-AzOracleActionDbNode -Cloudvmclustername $vmClusterName -Dbnodeocid $dbNodeOcid1 -ResourceGroupName $resourceGroup -Action $startActionName +``` + +```output +AdditionalDetail : +BackupIPId : ocid1.privateIp.fake.2.1 +BackupVnic2Id : ocid1.vnic.fake.2.1 +BackupVnicId : +CpuCoreCount : 2 +DbServerId : ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq +DbSystemId : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +FaultDomain : +HostIPId : ocid1.privateIp.fake.1.1 +Hostname : host-wq5t62 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster/dbNodes/ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz + 22lazevdaoiye7bh4iy2nwfa +LifecycleDetail : +LifecycleState : +MaintenanceType : +MemorySizeInGb : 45 +Name : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +Ocid : ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa +ProvisioningState : Starting +ResourceGroupName : PowerShellTestRg +SoftwareStorageSizeInGb : +StorageSizeInGb : 90 +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +TimeCreated : 04/07/2024 16:09:39 +TimeMaintenanceWindowEnd : +TimeMaintenanceWindowStart : +Type : Oracle.Database/cloudVmClusters/dbNodes +Vnic2Id : ocid1.vnic.fake.1.1 +VnicId : +``` + +Start a VM in a Cloud VM Cluster resource. +For more information, execute `Get-Help Invoke-AzOracleActionDbNode`. + +## PARAMETERS + +### -Action +Db action + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaIdentityCloudVMClusterExpanded, ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudVMClusterInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: ActionViaIdentityCloudVMClusterExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaJsonString, ActionViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Dbnodeocid +DbNode OCID. + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaJsonString, ActionViaJsonFilePath, ActionViaIdentityCloudVMClusterExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Action operation + +```yaml +Type: System.String +Parameter Sets: ActionViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Action operation + +```yaml +Type: System.String +Parameter Sets: ActionViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaJsonString, ActionViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: ActionExpanded, ActionViaJsonString, ActionViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDbNode + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md b/src/Oracle/Oracle/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md new file mode 100644 index 000000000000..699d5106fd36 --- /dev/null +++ b/src/Oracle/Oracle/help/Invoke-AzOracleSwitchoverAutonomousDatabase.md @@ -0,0 +1,270 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/invoke-azoracleswitchoverautonomousdatabase +schema: 2.0.0 +--- + +# Invoke-AzOracleSwitchoverAutonomousDatabase + +## SYNOPSIS +Perform switchover action on Autonomous Database + +## SYNTAX + +### SwitchoverExpanded (Default) +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename -ResourceGroupName + [-SubscriptionId ] [-PeerDbId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### SwitchoverViaJsonString +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename -ResourceGroupName + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### SwitchoverViaJsonFilePath +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename -ResourceGroupName + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### SwitchoverViaIdentityExpanded +``` +Invoke-AzOracleSwitchoverAutonomousDatabase -InputObject [-PeerDbId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Perform switchover action on Autonomous Database + +## EXAMPLES + +### Example 1: Switchover an Autonomous Database resource +```powershell +Invoke-AzOracleSwitchoverAutonomousDatabase -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -PeerDbId "PeerDbId" +``` + +Switchover an Autonomous Database resource. +For more information, execute `Get-Help Invoke-AzOracleSwitchoverAutonomousDatabase`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaJsonString, SwitchoverViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: SwitchoverViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Switchover operation + +```yaml +Type: System.String +Parameter Sets: SwitchoverViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Switchover operation + +```yaml +Type: System.String +Parameter Sets: SwitchoverViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbId +The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaJsonString, SwitchoverViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaJsonString, SwitchoverViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/New-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle/help/New-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..3da5dc892603 --- /dev/null +++ b/src/Oracle/Oracle/help/New-AzOracleAutonomousDatabase.md @@ -0,0 +1,810 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# New-AzOracleAutonomousDatabase + +## SYNOPSIS +Create a AutonomousDatabase + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -Location [-AdminPassword ] [-AutonomousDatabaseId ] + [-AutonomousMaintenanceScheduleType ] [-BackupRetentionPeriodInDay ] [-CharacterSet ] + [-ComputeCount ] [-ComputeModel ] [-CpuCoreCount ] + [-CustomerContact ] [-DataBaseType ] [-DataStorageSizeInGb ] + [-DataStorageSizeInTb ] [-DatabaseEdition ] [-DayOfWeekName ] [-DbVersion ] + [-DbWorkload ] [-DisplayName ] [-IsAutoScalingEnabled] [-IsAutoScalingForStorageEnabled] + [-IsLocalDataGuardEnabled] [-IsMtlsConnectionRequired] [-IsPreviewVersionWithServiceTermsAccepted] + [-LicenseModel ] [-NcharacterSet ] [-PrivateEndpointIP ] + [-PrivateEndpointLabel ] [-ScheduledStartTime ] [-ScheduledStopTime ] + [-SubnetId ] [-Tag ] [-VnetId ] [-WhitelistedIP ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a AutonomousDatabase + +## EXAMPLES + +### Example 1: Create an Autonomous Database resource +```powershell +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +[SecureString]$adbsAdminPassword = ConvertTo-SecureString -String "PowerShellTestPass123" -AsPlainText -Force + +$adbsName = "OFakePowerShellTestAdbs" +New-AzOracleAutonomousDatabase -Name $adbsName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $adbsName -DbWorkload "OLTP" -ComputeCount 2.0 -ComputeModel "ECPU" -DbVersion "19c" -DataStorageSizeInGb 32 -AdminPassword $adbsAdminPassword -LicenseModel "BringYourOwnLicense" -SubnetId $subnetId -VnetId $vnetId -DataBaseType "Regular" -CharacterSet "AL32UTF8" -NcharacterSet "AL16UTF16" +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashbur + n-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subn + ets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:19:26 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Create an Autonomous Database resource. +For more information, execute `Get-Help New-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AdminPassword +Admin password. + +```yaml +Type: System.Security.SecureString +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousDatabaseId +Autonomous Database ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousMaintenanceScheduleType +The maintenance schedule type of the Autonomous Database Serverless. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupRetentionPeriodInDay +Retention period, in days, for long-term backups + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CharacterSet +The character set for the autonomous database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The compute amount (CPUs) available to the database. + +```yaml +Type: System.Single +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeModel +The compute model of the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores to be made available to the database. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +Customer Contacts. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseEdition +The Oracle Database Edition that applies to the Autonomous databases. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataBaseType +Database type to be created. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInGb +The size, in gigabytes, of the data volume that will be created and attached to the database. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The quantity of data in the database, in terabytes. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DayOfWeekName +Name of the day of the week. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbVersion +A valid Oracle Database version for Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbWorkload +The Autonomous Database workload type + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingEnabled +Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingForStorageEnabled +Indicates if auto scaling is enabled for the Autonomous Database storage. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalDataGuardEnabled +Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMtlsConnectionRequired +Specifies if the Autonomous Database requires mTLS connections. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsPreviewVersionWithServiceTermsAccepted +Specifies if the Autonomous Database preview version is being provisioned. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the Oracle Autonomous Database. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NcharacterSet +The character set for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateEndpointIP +The private endpoint Ip address for the resource. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateEndpointLabel +The resource's private endpoint label. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStartTime +auto start time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStopTime +auto stop time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Client subnet + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnetId +VNET for network connectivity + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhitelistedIP +The client IP access control list (ACL). +This is an array of CIDR notations and/or IP addresses. +Values should be separate strings, separated by commas. +Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/New-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle/help/New-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..d2ca62cdbadb --- /dev/null +++ b/src/Oracle/Oracle/help/New-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,278 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoracleautonomousdatabasebackup +schema: 2.0.0 +--- + +# New-AzOracleAutonomousDatabaseBackup + +## SYNOPSIS +Create a AutonomousDatabaseBackup + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DisplayName ] [-RetentionPeriodInDay ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] -JsonString [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: Create a Backup for an Autonomous Database resource +```powershell +New-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -RetentionPeriodInDay 90 +``` + +Create a Backup for an Autonomous Database resource. +For more information, execute `Get-Help New-AzOracleAutonomousDatabaseBackup`. + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the backup. +The name does not have to be unique. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionPeriodInDay +Retention period, in days, for long-term backups. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/New-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle/help/New-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..93217f00e487 --- /dev/null +++ b/src/Oracle/Oracle/help/New-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,546 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# New-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Create a CloudExadataInfrastructure + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + -Location -Zone [-ComputeCount ] [-CustomerContact ] + [-DisplayName ] [-MaintenanceWindowCustomActionTimeoutInMin ] + [-MaintenanceWindowDaysOfWeek ] [-MaintenanceWindowHoursOfDay ] + [-MaintenanceWindowIsCustomActionTimeoutEnabled] [-MaintenanceWindowIsMonthlyPatchingEnabled] + [-MaintenanceWindowLeadTimeInWeek ] [-MaintenanceWindowMonth ] + [-MaintenanceWindowPatchingMode ] [-MaintenanceWindowPreference ] + [-MaintenanceWindowWeeksOfMonth ] [-Shape ] [-StorageCount ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Create a Cloud Exadata Infrastructure resource +```powershell +New-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Location "eastus" -Zone @("2") -Shape "Exadata.X9M" -ComputeCount 3 -StorageCount 3 -DisplayName "OFake_PowerShellTestExaInfra" +``` + +```output +... +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbu + uk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsa + e5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 08:49:18 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +Tag : { + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Create a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help New-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The number of compute servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. +Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. +Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The name for the Exadata infrastructure. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowCustomActionTimeoutInMin +Determines the amount of time the system will wait before the start of each database server patching operation. +Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowDaysOfWeek +Days during the week when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowHoursOfDay +The window of hours during the day when maintenance should be performed. +The window is a 4 hour slot. +Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + +```yaml +Type: System.Int32[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsCustomActionTimeoutEnabled +If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsMonthlyPatchingEnabled +is Monthly Patching Enabled + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowLeadTimeInWeek +Lead time window allows user to set a lead time to prepare for a down time. +The lead time is in weeks and valid value is between 1 to 4. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowMonth +Months during the year when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPatchingMode +Cloud Exadata infrastructure node patching method. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPreference +The maintenance window scheduling preference. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowWeeksOfMonth +Weeks during the month when maintenance should be performed. +Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. +Weeks start and end based on calendar dates, not days of the week. +For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. +Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. +Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + +```yaml +Type: System.Int32[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Shape +The model name of the cloud Exadata infrastructure resource. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageCount +The number of storage servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +CloudExadataInfrastructure zones + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/New-AzOracleCloudVMCluster.md b/src/Oracle/Oracle/help/New-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..51255feec0cc --- /dev/null +++ b/src/Oracle/Oracle/help/New-AzOracleCloudVMCluster.md @@ -0,0 +1,781 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/new-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# New-AzOracleCloudVMCluster + +## SYNOPSIS +Create a CloudVmCluster + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + -Location [-BackupSubnetCidr ] [-CloudExadataInfrastructureId ] + [-ClusterName ] [-CpuCoreCount ] [-DataCollectionOptionIsDiagnosticsEventsEnabled] + [-DataCollectionOptionIsHealthMonitoringEnabled] [-DataCollectionOptionIsIncidentLogsEnabled] + [-DataStoragePercentage ] [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] + [-DbServer ] [-DisplayName ] [-Domain ] [-GiVersion ] [-Hostname ] + [-IsLocalBackupEnabled] [-IsSparseDiskgroupEnabled] [-LicenseModel ] [-MemorySizeInGb ] + [-NsgCidr ] [-OcpuCount ] [-ScanListenerPortTcp ] [-ScanListenerPortTcpSsl ] + [-SshPublicKey ] [-SubnetId ] [-SystemVersion ] [-Tag ] + [-TimeZone ] [-VnetId ] [-ZoneId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonFilePath +``` +New-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### CreateViaJsonString +``` +New-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Create a CloudVmCluster + +## EXAMPLES + +### Example 1: Create a Cloud VM Cluster resource +```powershell +$subscriptionId = "00000000-0000-0000-0000-000000000000" +$resourceGroup = "PowerShellTestRg" + +$vnetName = "PSTestVnet" +$vnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)" + +$subnetName = "delegated" +$subnetId = "/subscriptions/$($subscriptionId)/resourceGroups/$($resourceGroup)/providers/Microsoft.Network/virtualNetworks/$($vnetName)/subnets/$($subnetName)" + +$sshPublicKey = "ssh-rsa xxx" + +$resourceGroup = "PowerShellTestRg" +$exaInfraName = "OFake_PowerShellTestExaInfra" +$exaInfra = Get-AzOracleCloudExadataInfrastructure -Name $exaInfraName -ResourceGroupName $resourceGroup +$exaInfraId = $exaInfra.Id + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename $exaInfraName -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServerOcid2 = $dbServerList[1].Ocid + +$vmClusterName = "OFake_PowerShellTestVmCluster" +New-AzOracleCloudVMCluster -Name $vmClusterName -ResourceGroupName $resourceGroup -Location "eastus" -DisplayName $vmClusterName -HostName "host" -CpuCoreCount 4 -CloudExadataInfrastructureId $exaInfraId -SshPublicKey $sshPublicKey -VnetId $vnetId -GiVersion "19.0.0.0" -SubnetId $subnetId -LicenseModel "LicenseIncluded" -ClusterName "TestVMC" -MemorySizeInGb 90 -DbNodeStorageSizeInGb 180 -DataStorageSizeInTb 2.0 -DataStoragePercentage 80 -TimeZone "UTC" -DbServer @($dbServerOcid1, $dbServerOcid2) +``` + +```output +... +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-group + s/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?regio + n=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa xxx} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/sub + nets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 09:04:17 +SystemDataLastModifiedBy : 857ad006-4380-4712-ba4c-22f7c64d84e7 +SystemDataLastModifiedByType : Application +SystemVersion : +Tag : { + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Create a Cloud VM Cluster resource. +For more information, execute `Get-Help New-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupSubnetCidr +Client OCI backup subnet CIDR, default is 192.168.252.0/22 + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudExadataInfrastructureId +Cloud Exadata Infrastructure ID + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The cluster name for cloud VM cluster. +The cluster name must begin with an alphabetic character, and may contain hyphens (-). +Underscores (_) are not permitted. +The cluster name can be no longer than 11 characters and is not case sensitive. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores enabled on the cloud VM cluster. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsDiagnosticsEventsEnabled +Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsHealthMonitoringEnabled +Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsIncidentLogsEnabled +Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStoragePercentage +The percentage assigned to DATA storage (user data and database files). +The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). +Accepted values are 35, 40, 60 and 80. +The default is 80 percent assigned to DATA storage. +See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The data disk group size to be allocated in TBs. + +```yaml +Type: System.Double +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbNodeStorageSizeInGb +The local node storage to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +The list of DB servers. + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display Name + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Domain +The domain name for the cloud VM cluster. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GiVersion +Oracle Grid Infrastructure (GI) software version + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Hostname +The hostname for the cloud VM cluster. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalBackupEnabled +If true, database backup on local Exadata storage is configured for the cloud VM cluster. +If false, database backup on local Exadata storage is not available in the cloud VM cluster. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSparseDiskgroupEnabled +If true, sparse disk group is configured for the cloud VM cluster. +If false, sparse disk group is not created. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Create operation + +```yaml +Type: System.String +Parameter Sets: CreateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the cloud VM cluster. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MemorySizeInGb +The memory to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NsgCidr +CIDR blocks for additional NSG ingress rules. +The VNET CIDRs used to provision the VM Cluster will be added by default. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.INsgCidr[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OcpuCount +The number of OCPU cores to enable on the cloud VM cluster. +Only 1 decimal place is allowed for the fractional part. + +```yaml +Type: System.Single +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcp +The TCP Single Client Access Name (SCAN) port. +The default port is 1521. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcpSsl +The TCPS Single Client Access Name (SCAN) port. +The default port is 2484. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Client subnet + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemVersion +Operating system version of the image. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeZone +The time zone of the cloud VM cluster. +For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnetId +VNET for network connectivity + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ZoneId +The OCID of the zone the cloud VM cluster is associated with. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/New-AzOracleCustomerContactObject.md b/src/Oracle/Oracle/help/New-AzOracleCustomerContactObject.md new file mode 100644 index 000000000000..95406df175f0 --- /dev/null +++ b/src/Oracle/Oracle/help/New-AzOracleCustomerContactObject.md @@ -0,0 +1,75 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclecustomercontactobject +schema: 2.0.0 +--- + +# New-AzOracleCustomerContactObject + +## SYNOPSIS +Create an in-memory object for CustomerContact. + +## SYNTAX + +``` +New-AzOracleCustomerContactObject -Email [-ProgressAction ] [] +``` + +## DESCRIPTION +Create an in-memory object for CustomerContact. + +## EXAMPLES + +### Example 1: Create an in-memory object for CustomerContact +```powershell +New-AzOracleCustomerContactObject -Email "example@oracle.com" +``` + +Create an in-memory object for CustomerContact. +For more information, execute `Get-Help New-AzOracleNsgCidrObject`. + +## PARAMETERS + +### -Email +The email address used by Oracle to send notifications regarding databases and infrastructure. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.CustomerContact + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/New-AzOracleNsgCidrObject.md b/src/Oracle/Oracle/help/New-AzOracleNsgCidrObject.md new file mode 100644 index 000000000000..c73373a0ccfa --- /dev/null +++ b/src/Oracle/Oracle/help/New-AzOracleNsgCidrObject.md @@ -0,0 +1,107 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/Az.Oracle/new-azoraclensgcidrobject +schema: 2.0.0 +--- + +# New-AzOracleNsgCidrObject + +## SYNOPSIS +Create an in-memory object for NsgCidr. + +## SYNTAX + +``` +New-AzOracleNsgCidrObject -Source [-DestinationPortRangeMax ] + [-DestinationPortRangeMin ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Create an in-memory object for NsgCidr. + +## EXAMPLES + +### Example 1: Create an in-memory object for NsgCidr +```powershell +New-AzOracleNsgCidrObject -Source "source" -DestinationPortRangeMax 0 -DestinationPortRangeMin 1 +``` + +Create an in-memory object for NsgCidr. +For more information, execute `Get-Help New-AzOracleNsgCidrObject`. + +## PARAMETERS + +### -DestinationPortRangeMax +The maximum port number, which must not be less than the minimum port number. +To specify a single port number, set both the min and max to the same value. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationPortRangeMin +The minimum port number, which must not be greater than the maximum port number. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Source +Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.NsgCidr + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..5b6707da1f5e --- /dev/null +++ b/src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabase.md @@ -0,0 +1,231 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Remove-AzOracleAutonomousDatabase + +## SYNOPSIS +Delete a AutonomousDatabase + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleAutonomousDatabase -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete a AutonomousDatabase + +## EXAMPLES + +### Example 1: Delete an Autonomous Database resource +```powershell +Remove-AzOracleAutonomousDatabase -NoWait -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/e6c5d63d-1c35-427e-8183-aa8c3bb8d8cc*EB99FC0E7CF00BAC9CF0656749107E4121167A81B99F4498184E967E11671798?api-vers… +``` + +Delete an Autonomous Database resource. +For more information, execute `Get-Help Remove-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabaseBackup.md b/src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..9f7363e1e65b --- /dev/null +++ b/src/Oracle/Oracle/help/Remove-AzOracleAutonomousDatabaseBackup.md @@ -0,0 +1,262 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoracleautonomousdatabasebackup +schema: 2.0.0 +--- + +# Remove-AzOracleAutonomousDatabaseBackup + +## SYNOPSIS +Delete a AutonomousDatabaseBackup + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentityAutonomousDatabase +``` +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid -AutonomousDatabaseInputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleAutonomousDatabaseBackup -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: Delete a Backup for an Autonomous Database resource +```powershell +Remove-AzOracleAutonomousDatabaseBackup -Adbbackupid "testBackupId" -Autonomousdatabasename "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" +``` + +Delete a Backup for an Autonomous Database resource. +For more information, execute `Get-Help Remove-AzOracleAutonomousDatabaseBackup`. + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: Delete, DeleteViaIdentityAutonomousDatabase +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousDatabaseInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentityAutonomousDatabase +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Remove-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle/help/Remove-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..02befeecf309 --- /dev/null +++ b/src/Oracle/Oracle/help/Remove-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,231 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# Remove-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Delete a CloudExadataInfrastructure + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleCloudExadataInfrastructure -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Delete a Cloud Exadata Infrastructure resource +```powershell +Remove-AzOracleCloudExadataInfrastructure -NoWait -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/adefb987-d10e-4d60-a429-43a6d8737e05*7E12B459C6B67811D263DD78E1675324D775BC3CF19E526B0227B852F7F50997?api-vers… +``` + +Delete a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Remove-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Remove-AzOracleCloudVMCluster.md b/src/Oracle/Oracle/help/Remove-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..538cbec76069 --- /dev/null +++ b/src/Oracle/Oracle/help/Remove-AzOracleCloudVMCluster.md @@ -0,0 +1,231 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# Remove-AzOracleCloudVMCluster + +## SYNOPSIS +Delete a CloudVmCluster + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleCloudVMCluster -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Delete a CloudVmCluster + +## EXAMPLES + +### Example 1: Delete a Cloud VM Cluster resource +```powershell +Remove-AzOracleCloudVMCluster -NoWait -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" +``` + +```output +Target +------ +https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/a6742d9f-d4fe-4d66-94b4-6df3a1322228*817681FB618A6DF40A3F1658F2C75D4747E1A72F75C4EC15E2D4F9297675979E?api-vers… +``` + +Delete a Cloud VM Cluster resource. +For more information, execute `Get-Help Remove-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Remove-AzOracleCloudVMClusterVM.md b/src/Oracle/Oracle/help/Remove-AzOracleCloudVMClusterVM.md new file mode 100644 index 000000000000..01c808660bd9 --- /dev/null +++ b/src/Oracle/Oracle/help/Remove-AzOracleCloudVMClusterVM.md @@ -0,0 +1,307 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/remove-azoraclecloudvmclustervm +schema: 2.0.0 +--- + +# Remove-AzOracleCloudVMClusterVM + +## SYNOPSIS +Remove VMs from the VM Cluster + +## SYNTAX + +### RemoveExpanded (Default) +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] -DbServer [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### RemoveViaJsonString +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### RemoveViaJsonFilePath +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### Remove +``` +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] -Body [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### RemoveViaIdentityExpanded +``` +Remove-AzOracleCloudVMClusterVM -InputObject -DbServer + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### RemoveViaIdentity +``` +Remove-AzOracleCloudVMClusterVM -InputObject -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Remove VMs from the VM Cluster + +## EXAMPLES + +### Example 1: Remove a VM from a Cloud VM Cluster resource +```powershell +$resourceGroup = "PowerShellTestRg" + +$dbServerList = Get-AzOracleDbServer -Cloudexadatainfrastructurename "OFake_PowerShellTestExaInfra" -ResourceGroupName $resourceGroup +$dbServerOcid1 = $dbServerList[0].Ocid +$dbServersToRemove = @($dbServerOcid1) + +Remove-AzOracleCloudVMClusterVM -Cloudvmclustername "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -DbServer $dbServersToRemove +``` + +Remove a VM from a Cloud VM Cluster resource. +For more information, execute `Get-Help Remove-AzOracleCloudVMClusterVM`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Add/Remove (Virtual Machine) DbNode model + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode +Parameter Sets: Remove, RemoveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: RemoveExpanded, RemoveViaJsonString, RemoveViaJsonFilePath, Remove +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +Db servers ocids + +```yaml +Type: System.String[] +Parameter Sets: RemoveExpanded, RemoveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: RemoveViaIdentityExpanded, RemoveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Remove operation + +```yaml +Type: System.String +Parameter Sets: RemoveViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Remove operation + +```yaml +Type: System.String +Parameter Sets: RemoveViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: RemoveExpanded, RemoveViaJsonString, RemoveViaJsonFilePath, Remove +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: RemoveExpanded, RemoveViaJsonString, RemoveViaJsonFilePath, Remove +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAddRemoveDbNode + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Restore-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle/help/Restore-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..5c4ea39b52f9 --- /dev/null +++ b/src/Oracle/Oracle/help/Restore-AzOracleAutonomousDatabase.md @@ -0,0 +1,302 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/restore-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Restore-AzOracleAutonomousDatabase + +## SYNOPSIS +Restores an Autonomous Database based on the provided request parameters. + +## SYNTAX + +### RestoreExpanded (Default) +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -Timestamp [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### RestoreViaJsonString +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### RestoreViaJsonFilePath +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### Restore +``` +Restore-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -Body [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### RestoreViaIdentityExpanded +``` +Restore-AzOracleAutonomousDatabase -InputObject -Timestamp + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### RestoreViaIdentity +``` +Restore-AzOracleAutonomousDatabase -InputObject -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Restores an Autonomous Database based on the provided request parameters. + +## EXAMPLES + +### Example 1: Restore a Backup for an Autonomous Database resource +```powershell +$timeStamp = Get-Date +Restore-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Timestamp $timeStamp +``` + +Restore a Backup for an Autonomous Database resource. +For more information, execute `Get-Help Restore-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Details to restore an Oracle Autonomous Database. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails +Parameter Sets: Restore, RestoreViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: RestoreViaIdentityExpanded, RestoreViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Restore operation + +```yaml +Type: System.String +Parameter Sets: RestoreViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Restore operation + +```yaml +Type: System.String +Parameter Sets: RestoreViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: RestoreExpanded, RestoreViaJsonString, RestoreViaJsonFilePath, Restore +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: RestoreExpanded, RestoreViaJsonString, RestoreViaJsonFilePath, Restore +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: RestoreExpanded, RestoreViaJsonString, RestoreViaJsonFilePath, Restore +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Timestamp +The time to restore the database to. + +```yaml +Type: System.DateTime +Parameter Sets: RestoreExpanded, RestoreViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IRestoreAutonomousDatabaseDetails + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Update-AzOracleAutonomousDatabase.md b/src/Oracle/Oracle/help/Update-AzOracleAutonomousDatabase.md new file mode 100644 index 000000000000..7deab4290a5b --- /dev/null +++ b/src/Oracle/Oracle/help/Update-AzOracleAutonomousDatabase.md @@ -0,0 +1,773 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/update-azoracleautonomousdatabase +schema: 2.0.0 +--- + +# Update-AzOracleAutonomousDatabase + +## SYNOPSIS +Update a AutonomousDatabase + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + [-AdminPassword ] [-AutonomousMaintenanceScheduleType ] + [-BackupRetentionPeriodInDay ] [-ComputeCount ] [-CpuCoreCount ] + [-CustomerContact ] [-DataStorageSizeInGb ] [-DataStorageSizeInTb ] + [-DatabaseEdition ] [-DayOfWeekName ] [-DisplayName ] [-IsAutoScalingEnabled] + [-IsAutoScalingForStorageEnabled] [-IsLocalDataGuardEnabled] [-IsMtlsConnectionRequired] + [-LicenseModel ] [-LocalAdgAutoFailoverMaxDataLossLimit ] [-LongTermBackupScheduleIsDisabled] + [-LongTermBackupScheduleRepeatCadence ] [-LongTermBackupScheduleRetentionPeriodInDay ] + [-LongTermBackupScheduleTimeOfBackup ] [-OpenMode ] [-PeerDbId ] + [-PermissionLevel ] [-Role ] [-ScheduledStartTime ] [-ScheduledStopTime ] + [-Tag ] [-WhitelistedIP ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzOracleAutonomousDatabase -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleAutonomousDatabase -InputObject [-AdminPassword ] + [-AutonomousMaintenanceScheduleType ] [-BackupRetentionPeriodInDay ] [-ComputeCount ] + [-CpuCoreCount ] [-CustomerContact ] [-DataStorageSizeInGb ] + [-DataStorageSizeInTb ] [-DatabaseEdition ] [-DayOfWeekName ] [-DisplayName ] + [-IsAutoScalingEnabled] [-IsAutoScalingForStorageEnabled] [-IsLocalDataGuardEnabled] + [-IsMtlsConnectionRequired] [-LicenseModel ] [-LocalAdgAutoFailoverMaxDataLossLimit ] + [-LongTermBackupScheduleIsDisabled] [-LongTermBackupScheduleRepeatCadence ] + [-LongTermBackupScheduleRetentionPeriodInDay ] [-LongTermBackupScheduleTimeOfBackup ] + [-OpenMode ] [-PeerDbId ] [-PermissionLevel ] [-Role ] + [-ScheduledStartTime ] [-ScheduledStopTime ] [-Tag ] [-WhitelistedIP ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Update a AutonomousDatabase + +## EXAMPLES + +### Example 1: Update an Autonomous Database resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleAutonomousDatabase -Name "OFakePowerShellTestAdbs" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +... +Name : OFakePowerShellTestAdbs +NcharacterSet : AL16UTF16 +NextLongTermBackupTimeStamp : +OciUrl : https://cloud.oracle.com/db/adbs/ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..a + aaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.autonomousdatabase.oc1.iad.anuwcljtnirvylqa7vzcwywunyc2mjnuuwov4vm626yj46caifxh4le5uoxa +OpenMode : ReadWrite +OperationsInsightsStatus : +PeerDbId : +PeerDbIds : +PermissionLevel : +PrivateEndpoint : byui3zo3.adb.us-ashburn-1.oraclecloud.com +PrivateEndpointIP : 10.0.1.51 +PrivateEndpointLabel : byui3zo3 +Property : { + ... + } +ProvisionableCpu : +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Role : +ScheduledOperationScheduledStartTime : +ScheduledOperationScheduledStopTime : +ServiceConsoleUrl : +SqlWebDeveloperUrl : +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated +SupportedRegionsToCloneTo : +SystemDataCreatedAt : 05/07/2024 13:40:35 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:41:08 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +Tag : { + "tagName": "tagValue" + } +TimeCreated : 05/07/2024 13:44:18 +TimeDataGuardRoleChanged : +TimeDeletionOfFreeAutonomousDatabase : +TimeLocalDataGuardEnabled : Fri Jul 05 13:44:40 UTC 2024 +TimeMaintenanceBegin : 07/07/2024 09:00:00 +TimeMaintenanceEnd : 07/07/2024 11:00:00 +TimeOfLastFailover : +TimeOfLastRefresh : +TimeOfLastRefreshPoint : +TimeOfLastSwitchover : +TimeReclamationOfFreeAutonomousDatabase : +Type : oracle.database/autonomousdatabases +UsedDataStorageSizeInGb : +UsedDataStorageSizeInTb : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +WhitelistedIP : +``` + +Update an Autonomous Database resource. +For more information, execute `Get-Help Update-AzOracleAutonomousDatabase`. + +## PARAMETERS + +### -AdminPassword +Admin password. + +```yaml +Type: System.Security.SecureString +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousMaintenanceScheduleType +The maintenance schedule type of the Autonomous Database Serverless. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupRetentionPeriodInDay +Retention period, in days, for long-term backups + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The compute amount (CPUs) available to the database. + +```yaml +Type: System.Single +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores to be made available to the database. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +Customer Contacts. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseEdition +The Oracle Database Edition that applies to the Autonomous databases. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInGb +The size, in gigabytes, of the data volume that will be created and attached to the database. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The quantity of data in the database, in terabytes. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DayOfWeekName +Name of the day of the week. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IsAutoScalingEnabled +Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingForStorageEnabled +Indicates if auto scaling is enabled for the Autonomous Database storage. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalDataGuardEnabled +Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMtlsConnectionRequired +Specifies if the Autonomous Database requires mTLS connections. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the Oracle Autonomous Database. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocalAdgAutoFailoverMaxDataLossLimit +Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleIsDisabled +Indicates if the long-term backup schedule should be deleted. +The default value is `FALSE`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRepeatCadence +The frequency of the long-term backup schedule + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRetentionPeriodInDay +Retention period, in days, for backups. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleTimeOfBackup +The timestamp for the long-term backup schedule. +For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + +```yaml +Type: System.DateTime +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OpenMode +Indicates the Autonomous Database mode. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbId +The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionLevel +The Autonomous Database permission level. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Role +The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStartTime +auto start time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledStopTime +auto stop time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhitelistedIP +The client IP access control list (ACL). +This is an array of CIDR notations and/or IP addresses. +Values should be separate strings, separated by commas. +Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25'] + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IAutonomousDatabase + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Update-AzOracleCloudExadataInfrastructure.md b/src/Oracle/Oracle/help/Update-AzOracleCloudExadataInfrastructure.md new file mode 100644 index 000000000000..22250a3cfa1e --- /dev/null +++ b/src/Oracle/Oracle/help/Update-AzOracleCloudExadataInfrastructure.md @@ -0,0 +1,581 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudexadatainfrastructure +schema: 2.0.0 +--- + +# Update-AzOracleCloudExadataInfrastructure + +## SYNOPSIS +Update a CloudExadataInfrastructure + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + [-ComputeCount ] [-CustomerContact ] [-DisplayName ] + [-MaintenanceWindowCustomActionTimeoutInMin ] [-MaintenanceWindowDaysOfWeek ] + [-MaintenanceWindowHoursOfDay ] [-MaintenanceWindowIsCustomActionTimeoutEnabled] + [-MaintenanceWindowIsMonthlyPatchingEnabled] [-MaintenanceWindowLeadTimeInWeek ] + [-MaintenanceWindowMonth ] [-MaintenanceWindowPatchingMode ] + [-MaintenanceWindowPreference ] [-MaintenanceWindowWeeksOfMonth ] [-StorageCount ] + [-Tag ] [-Zone ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzOracleCloudExadataInfrastructure -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleCloudExadataInfrastructure -InputObject [-ComputeCount ] + [-CustomerContact ] [-DisplayName ] + [-MaintenanceWindowCustomActionTimeoutInMin ] [-MaintenanceWindowDaysOfWeek ] + [-MaintenanceWindowHoursOfDay ] [-MaintenanceWindowIsCustomActionTimeoutEnabled] + [-MaintenanceWindowIsMonthlyPatchingEnabled] [-MaintenanceWindowLeadTimeInWeek ] + [-MaintenanceWindowMonth ] [-MaintenanceWindowPatchingMode ] + [-MaintenanceWindowPreference ] [-MaintenanceWindowWeeksOfMonth ] [-StorageCount ] + [-Tag ] [-Zone ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: Update a Cloud Exadata Infrastructure resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudExadataInfrastructure -Name "OFake_PowerShellTestExaInfra" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +ActivatedStorageCount : 3 +AdditionalStorageCount : 0 +AvailableStorageSizeInGb : 0 +ComputeCount : 3 +CpuCount : 4 +CustomerContact : +DataStorageSizeInTb : 2 +DbNodeStorageSizeInGb : 938 +DbServerVersion : 23.1.13.0.0.240410.1 +DisplayName : OFake_PowerShellTestExaInfra +EstimatedPatchingTimeEstimatedDbServerPatchingTime : +EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime : +EstimatedPatchingTimeEstimatedStorageServerPatchingTime : +EstimatedPatchingTimeTotalEstimatedPatchingTime : +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra +LastMaintenanceRunId : +LifecycleDetail : +LifecycleState : Available +Location : eastus +MaintenanceWindowCustomActionTimeoutInMin : 0 +MaintenanceWindowDaysOfWeek : +MaintenanceWindowHoursOfDay : +MaintenanceWindowIsCustomActionTimeoutEnabled : False +MaintenanceWindowIsMonthlyPatchingEnabled : +MaintenanceWindowLeadTimeInWeek : 0 +MaintenanceWindowMonth : +MaintenanceWindowPatchingMode : Rolling +MaintenanceWindowPreference : NoPreference +MaintenanceWindowWeeksOfMonth : +MaxCpuCount : 378 +MaxDataStorageInTb : 192 +MaxDbNodeStorageSizeInGb : 6729 +MaxMemoryInGb : 4170 +MemorySizeInGb : 90 +MonthlyDbServerVersion : +MonthlyStorageServerVersion : +Name : OFake_PowerShellTestExaInfra +NextMaintenanceRunId : +OciUrl : https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orps + andbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +Shape : Exadata.X9M +StorageCount : 3 +StorageServerVersion : 21.1.0.0.0 +SystemDataCreatedAt : 04/07/2024 13:20:00 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:35:54 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +Tag : { + "tagName": "tagValue" + } +TimeCreated : 2024-07-04T13:20:13.877Z +TotalStorageSizeInGb : 196608 +Type : oracle.database/cloudexadatainfrastructures +Zone : {2} +``` + +Update a Cloud Exadata Infrastructure resource. +For more information, execute `Get-Help Update-AzOracleCloudExadataInfrastructure`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The number of compute servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. +Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. +Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICustomerContact[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The name for the Exadata infrastructure. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowCustomActionTimeoutInMin +Determines the amount of time the system will wait before the start of each database server patching operation. +Custom action timeout is in minutes and valid value is between 15 to 120 (inclusive). + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowDaysOfWeek +Days during the week when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IDayOfWeek[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowHoursOfDay +The window of hours during the day when maintenance should be performed. +The window is a 4 hour slot. +Valid values are - 0 - represents time slot 0:00 - 3:59 UTC - 4 - represents time slot 4:00 - 7:59 UTC - 8 - represents time slot 8:00 - 11:59 UTC - 12 - represents time slot 12:00 - 15:59 UTC - 16 - represents time slot 16:00 - 19:59 UTC - 20 - represents time slot 20:00 - 23:59 UTC + +```yaml +Type: System.Int32[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsCustomActionTimeoutEnabled +If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsMonthlyPatchingEnabled +is Monthly Patching Enabled + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowLeadTimeInWeek +Lead time window allows user to set a lead time to prepare for a down time. +The lead time is in weeks and valid value is between 1 to 4. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowMonth +Months during the year when maintenance should be performed. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IMonth[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPatchingMode +Cloud Exadata infrastructure node patching method. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPreference +The maintenance window scheduling preference. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowWeeksOfMonth +Weeks during the month when maintenance should be performed. +Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. +Weeks start and end based on calendar dates, not days of the week. +For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. +Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. +Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed. + +```yaml +Type: System.Int32[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageCount +The number of storage servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +CloudExadataInfrastructure zones + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS diff --git a/src/Oracle/Oracle/help/Update-AzOracleCloudVMCluster.md b/src/Oracle/Oracle/help/Update-AzOracleCloudVMCluster.md new file mode 100644 index 000000000000..29c21b09b0f7 --- /dev/null +++ b/src/Oracle/Oracle/help/Update-AzOracleCloudVMCluster.md @@ -0,0 +1,549 @@ +--- +external help file: Az.Oracle-help.xml +Module Name: Az.Oracle +online version: https://learn.microsoft.com/powershell/module/az.oracle/update-azoraclecloudvmcluster +schema: 2.0.0 +--- + +# Update-AzOracleCloudVMCluster + +## SYNOPSIS +Update a CloudVmCluster + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + [-ComputeNode ] [-CpuCoreCount ] [-DataCollectionOptionIsDiagnosticsEventsEnabled] + [-DataCollectionOptionIsHealthMonitoringEnabled] [-DataCollectionOptionIsIncidentLogsEnabled] + [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] [-DisplayName ] + [-LicenseModel ] [-MemorySizeInGb ] [-OcpuCount ] [-SshPublicKey ] + [-StorageSizeInGb ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonString +``` +Update-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaJsonFilePath +``` +Update-AzOracleCloudVMCluster -Name -ResourceGroupName [-SubscriptionId ] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] + [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleCloudVMCluster -InputObject [-ComputeNode ] [-CpuCoreCount ] + [-DataCollectionOptionIsDiagnosticsEventsEnabled] [-DataCollectionOptionIsHealthMonitoringEnabled] + [-DataCollectionOptionIsIncidentLogsEnabled] [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] + [-DisplayName ] [-LicenseModel ] [-MemorySizeInGb ] [-OcpuCount ] + [-SshPublicKey ] [-StorageSizeInGb ] [-Tag ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Update a CloudVmCluster + +## EXAMPLES + +### Example 1: Update a Cloud VM Cluster resource +```powershell +$tagHashTable = @{'tagName'="tagValue"} +Update-AzOracleCloudVMCluster -Name "OFake_PowerShellTestVmCluster" -ResourceGroupName "PowerShellTestRg" -Tag $tagHashTable +``` + +```output +BackupSubnetCidr : +CloudExadataInfrastructureId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra +ClusterName : TestVMC +CompartmentId : ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +ComputeNode : +CpuCoreCount : 4 +DataCollectionOptionIsDiagnosticsEventsEnabled : False +DataCollectionOptionIsHealthMonitoringEnabled : False +DataCollectionOptionIsIncidentLogsEnabled : False +DataStoragePercentage : 80 +DataStorageSizeInTb : 2 +DbNodeStorageSizeInGb : 180 +DbServer : {ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq, ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq} +DiskRedundancy : High +DisplayName : OFake_PowerShellTestVmCluster +Domain : ocidelegated.ocipstestvnet.oraclevcn.com +GiVersion : 19.9.0.0.0 +Hostname : host-wq5t6 +Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_PowerShellTestVmCluster +IormConfigCacheDbPlan : +IormConfigCacheLifecycleDetail : +IormConfigCacheLifecycleState : +IormConfigCacheObjective : +IsLocalBackupEnabled : False +IsSparseDiskgroupEnabled : False +LastUpdateHistoryEntryId : +LicenseModel : LicenseIncluded +LifecycleDetail : +LifecycleState : Available +ListenerPort : 1521 +Location : eastus +MemorySizeInGb : 90 +Name : OFake_PowerShellTestVmCluster +NodeCount : 2 +NsgCidr : +NsgUrl : https://cloud.oracle.com/networking/vcns/ocid1.vcn.oc1.iad.amaaaaaanirvylqaltsnipqfdbwlimfznzto7vjto23cqahcu3k3g673z7ma/network-security-groups/ocid1.networksecuritygroup.oc1.iad.aaaaaaaas45h3bfix5lxcyvi + 4x5wxlrrt62r4pa5we63r6drzcgdwktdobba?region=us-ashburn-1 +OciUrl : https://cloud.oracle.com/dbaas/cloudVmClusters/ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compart + ment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua +Ocid : ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq +OcpuCount : 4 +ProvisioningState : Succeeded +ResourceGroupName : PowerShellTestRg +ScanDnsName : host-wq5t6-scan.ocidelegated.ocipstestvnet.oraclevcn.com +ScanDnsRecordId : +ScanIPId : {} +ScanListenerPortTcp : 1521 +ScanListenerPortTcpSsl : 2484 +Shape : Exadata.X9M +SshPublicKey : {ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKJkePl4prXTs6cZ77AS9kGs5TO1EdfDdQZAtD7cfBVJ8X4wN+aOvLhk+u74D3qXad2OdQ/ij5q+xVzoXLXNBIZFQjB8JqWpgvOrOCAakFGc0OatJhSVlmJKW7JboQcUu7AzABfu+Ciso1QQTqlc2+awoZzPhfP9sgDM + N6zI15Q9wSuxERor8oMSc78NW652wMzl97zO+bYdO9vIjBu27/WYZN/OpFJ0Ss4AzW/V9r2h6FFCkG+GXzhZArk3NeEstCSO2bjv3vO40+M0vfRD2jQrOSKhaLolk+crLGamaclY0YYCVB23rk6gCimWbVuvpHn+x1QSvN2d19xAmrIsHdTv/1lCEJetMA96pBq/jbljPwV + KPFfVkyC8Ivt5rkbYizmUlYAbDMksGMUR4ncjScY7o/S0JKs14HihOnCoSGVXhH1dDgc8AsI+Ujs+GGR4U8IXJGEpZmhdnLa6mDymvr1tLWdQaI2y5FuWxsy4diKjEsPxCrnqfxlZxFBbQ29AU= generated-by-azure} +StorageSizeInGb : 196608 +SubnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated +SubnetOcid : ocid1.subnet.oc1.iad.aaaaaaaatodiqebvhyea45s6nyip4d7u7zizkc6soxbmsymuo2vu4zxosxaq +SystemDataCreatedAt : 04/07/2024 15:52:12 +SystemDataCreatedBy : example@oracle.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 06/07/2024 15:39:06 +SystemDataLastModifiedBy : example@oracle.com +SystemDataLastModifiedByType : User +SystemVersion : +Tag : { + "tagName": "tagValue" + } +TimeCreated : 04/07/2024 16:09:39 +TimeZone : UTC +Type : oracle.database/cloudvmclusters +VipId : +VnetId : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet +ZoneId : ocid1.dns-zone.oc1.iad.aaaaaaaah4rwrfuscditbdg7yjutywp3xpwyuqmcj2bymvb4dn47xoxmvenq +``` + +Update a Cloud VM Cluster resource. +For more information, execute `Get-Help Update-AzOracleCloudVMCluster`. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeNode +The list of compute servers to be added to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores enabled on the cloud VM cluster. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsDiagnosticsEventsEnabled +Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsHealthMonitoringEnabled +Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsIncidentLogsEnabled +Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The data disk group size to be allocated in TBs. + +```yaml +Type: System.Double +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbNodeStorageSizeInGb +The local node storage to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display Name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the cloud VM cluster. +The default is LICENSE_INCLUDED. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MemorySizeInGb +The memory to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OcpuCount +The number of OCPU cores to enable on the cloud VM cluster. +Only 1 decimal place is allowed for the fractional part. + +```yaml +Type: System.Single +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageSizeInGb +The data disk group size to be allocated in GBs per VM. + +```yaml +Type: System.Int32 +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.IOracleIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Oracle.Models.ICloudVMCluster + +## NOTES + +## RELATED LINKS diff --git a/tools/CreateMappings_rules.json b/tools/CreateMappings_rules.json index 7d532bfa2ed7..2307ddc99ffd 100644 --- a/tools/CreateMappings_rules.json +++ b/tools/CreateMappings_rules.json @@ -903,5 +903,9 @@ { "module": "Informatica", "alias": "Informatica" + }, + { + "module": "Oracle", + "alias": "Oracle" } ]